-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #289 from matthias-Q/show_statements
feat: add `SHOW` commands
- Loading branch information
Showing
3 changed files
with
129 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
================================================================================ | ||
SHOW CREATE TABLE | ||
================================================================================ | ||
|
||
SHOW CREATE TABLE mytable; | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(program | ||
(statement | ||
(keyword_show) | ||
(keyword_create) | ||
(keyword_table) | ||
(object_reference | ||
(identifier)))) | ||
|
||
================================================================================ | ||
SHOW CREATE VIEW | ||
================================================================================ | ||
|
||
SHOW CREATE VIEW myview; | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(program | ||
(statement | ||
(keyword_show) | ||
(keyword_create) | ||
(keyword_view) | ||
(object_reference | ||
(identifier)))) | ||
|
||
================================================================================ | ||
SHOW CREATE SCHEMA | ||
================================================================================ | ||
|
||
SHOW CREATE SCHEMA myschema; | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(program | ||
(statement | ||
(keyword_show) | ||
(keyword_create) | ||
(keyword_schema) | ||
(object_reference | ||
(identifier)))) | ||
|
||
================================================================================ | ||
SHOW CREATE USER | ||
================================================================================ | ||
|
||
SHOW CREATE USER einstein; | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(program | ||
(statement | ||
(keyword_show) | ||
(keyword_create) | ||
(keyword_user) | ||
(object_reference | ||
(identifier)))) | ||
|
||
================================================================================ | ||
SHOW ALL | ||
================================================================================ | ||
|
||
SHOW ALL; | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(program | ||
(statement | ||
(keyword_show) | ||
(keyword_all))) | ||
|
||
================================================================================ | ||
SHOW TABLES with PATTERN | ||
================================================================================ | ||
|
||
SHOW TABLES FROM tpch.tiny LIKE 'p%'; | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(program | ||
(statement | ||
(keyword_show) | ||
(keyword_tables) | ||
(keyword_from) | ||
(object_reference | ||
(identifier)) | ||
(identifier) | ||
(keyword_like) | ||
(literal))) |