-
-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ANSI + MySQL 'explain' * Add Snowflake explain 馃ザ * Add the _more complicated_ postgres explain 馃И * Update CHANGELOG 鉁忥笍 * Mypy 馃Ч
- Loading branch information
Daniel Mateus Pires
committed
Apr 12, 2021
1 parent
668f235
commit f32e63f
Showing
11 changed files
with
348 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
explain select 1; | ||
|
||
explain update tbl set foo = 1 where bar = 2; | ||
|
||
explain delete from tbl where foo = 1; | ||
|
||
explain insert into tbl (col1) values (123); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
file: | ||
- statement: | ||
explain_statement: | ||
keyword: explain | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
literal: '1' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
keyword: explain | ||
update_statement: | ||
keyword: update | ||
table_reference: | ||
identifier: tbl | ||
set_clause_list: | ||
keyword: set | ||
set_clause: | ||
column_reference: | ||
identifier: foo | ||
comparison_operator: '=' | ||
literal: '1' | ||
where_clause: | ||
keyword: where | ||
expression: | ||
column_reference: | ||
identifier: bar | ||
comparison_operator: '=' | ||
literal: '2' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
keyword: explain | ||
delete_statement: | ||
keyword: delete | ||
from_clause: | ||
keyword: from | ||
from_expression: | ||
from_expression_element: | ||
table_expression: | ||
table_reference: | ||
identifier: tbl | ||
where_clause: | ||
keyword: where | ||
expression: | ||
column_reference: | ||
identifier: foo | ||
comparison_operator: '=' | ||
literal: '1' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
keyword: explain | ||
insert_statement: | ||
- keyword: insert | ||
- keyword: into | ||
- table_reference: | ||
identifier: tbl | ||
- start_bracket: ( | ||
- column_reference: | ||
identifier: col1 | ||
- end_bracket: ) | ||
- values_clause: | ||
keyword: values | ||
start_bracket: ( | ||
literal: '123' | ||
end_bracket: ) | ||
- statement_terminator: ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
explain (analyze true, costs false, verbose true, buffers true, format xml) select 1; | ||
|
||
explain analyze verbose select 1; | ||
|
||
explain analyze select 1; | ||
|
||
explain (format text) select 1; | ||
|
||
explain (format json) select 1; | ||
|
||
explain (format yaml) select 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
file: | ||
- statement: | ||
explain_statement: | ||
- keyword: explain | ||
- start_bracket: ( | ||
- explain_option: | ||
keyword: analyze | ||
literal: 'true' | ||
- comma: ',' | ||
- explain_option: | ||
keyword: costs | ||
literal: 'false' | ||
- comma: ',' | ||
- explain_option: | ||
keyword: verbose | ||
literal: 'true' | ||
- comma: ',' | ||
- explain_option: | ||
keyword: buffers | ||
literal: 'true' | ||
- comma: ',' | ||
- explain_option: | ||
- keyword: format | ||
- keyword: xml | ||
- end_bracket: ) | ||
- select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
literal: '1' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
- keyword: explain | ||
- keyword: analyze | ||
- keyword: verbose | ||
- select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
literal: '1' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
- keyword: explain | ||
- keyword: analyze | ||
- select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
literal: '1' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
keyword: explain | ||
start_bracket: ( | ||
explain_option: | ||
- keyword: format | ||
- keyword: text | ||
end_bracket: ) | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
literal: '1' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
keyword: explain | ||
start_bracket: ( | ||
explain_option: | ||
- keyword: format | ||
- keyword: json | ||
end_bracket: ) | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
literal: '1' | ||
- statement_terminator: ; | ||
- statement: | ||
explain_statement: | ||
keyword: explain | ||
start_bracket: ( | ||
explain_option: | ||
- keyword: format | ||
- keyword: yaml | ||
end_bracket: ) | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
literal: '1' | ||
- statement_terminator: ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
explain using tabular select 1; | ||
|
||
explain using json select 1; | ||
|
||
explain using text select 1; | ||
|
||
explain select 1; |
Oops, something went wrong.