1 | #pragma once |
2 | |
3 | #include <Parsers/IParserBase.h> |
4 | #include <Parsers/ExpressionElementParsers.h> |
5 | |
6 | |
7 | namespace DB |
8 | { |
9 | |
10 | /** Query like this: |
11 | * DROP|DETACH|TRUNCATE TABLE [IF EXISTS] [db.]name |
12 | * |
13 | * Or: |
14 | * DROP DATABASE [IF EXISTS] db |
15 | * |
16 | * Or: |
17 | * DROP DICTIONARY [IF EXISTS] [db.]name |
18 | */ |
19 | class ParserDropQuery : public IParserBase |
20 | { |
21 | protected: |
22 | const char * getName() const { return "DROP query" ; } |
23 | bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected); |
24 | |
25 | bool parseDropQuery(Pos & pos, ASTPtr & node, Expected & expected); |
26 | bool parseDetachQuery(Pos & pos, ASTPtr & node, Expected & expected); |
27 | bool parseTruncateQuery(Pos & pos, ASTPtr & node, Expected & expected); |
28 | }; |
29 | |
30 | } |
31 | |