| 1 | #pragma once | 
|---|---|
| 2 | |
| 3 | #include <iomanip> | 
| 4 | #include <Parsers/IAST.h> | 
| 5 | #include <Parsers/ASTQueryWithOutput.h> | 
| 6 | |
| 7 | |
| 8 | namespace DB | 
| 9 | { | 
| 10 | |
| 11 | |
| 12 | /** Query SHOW TABLES or SHOW DATABASES | 
| 13 | */ | 
| 14 | class ASTShowTablesQuery : public ASTQueryWithOutput | 
| 15 | { | 
| 16 | public: | 
| 17 | bool databases{false}; | 
| 18 | bool dictionaries{false}; | 
| 19 | bool temporary{false}; | 
| 20 | String from; | 
| 21 | String like; | 
| 22 | bool not_like{false}; | 
| 23 | ASTPtr limit_length; | 
| 24 | |
| 25 | /** Get the text that identifies this element. */ | 
| 26 | String getID(char) const override { return "ShowTables"; } | 
| 27 | |
| 28 | ASTPtr clone() const override; | 
| 29 | |
| 30 | protected: | 
| 31 | void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override; | 
| 32 | }; | 
| 33 | |
| 34 | } | 
| 35 | 
