Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ast/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ const (
RepeatableRead = "REPEATABLE-READ"

// Valid formats for explain statement.
ExplainFormatROW = "row"
ExplainFormatDOT = "dot"
PumpType = "PUMP"
DrainerType = "DRAINER"
ExplainFormatROW = "row"
ExplainFormatDOT = "dot"
ExplainFormatHint = "hint"
PumpType = "PUMP"
DrainerType = "DRAINER"
)

// Transaction mode constants.
Expand All @@ -80,6 +81,7 @@ var (
ExplainFormats = []string{
ExplainFormatROW,
ExplainFormatDOT,
ExplainFormatHint,
}
)

Expand Down
1 change: 1 addition & 0 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3700,6 +3700,7 @@ func (s *testParserSuite) TestExplain(c *C) {
{"EXPLAIN FORMAT = TRADITIONAL SELECT 1", true, "EXPLAIN FORMAT = 'row' SELECT 1"},
{"EXPLAIN FORMAT = JSON FOR CONNECTION 1", true, "EXPLAIN FORMAT = 'json' FOR CONNECTION 1"},
{"EXPLAIN FORMAT = JSON SELECT 1", true, "EXPLAIN FORMAT = 'json' SELECT 1"},
{"EXPLAIN FORMAT = 'hint' SELECT 1", true, "EXPLAIN FORMAT = 'hint' SELECT 1"},
}
s.RunTest(c, table)
}
Expand Down