mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 14:11:58 +00:00
31 lines
717 B
C++
31 lines
717 B
C++
#pragma once
|
|
|
|
#include <Parsers/IParserBase.h>
|
|
#include <Parsers/ExpressionElementParsers.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Query like this:
|
|
* DROP|DETACH|TRUNCATE TABLE [IF EXISTS] [db.]name
|
|
*
|
|
* Or:
|
|
* DROP DATABASE [IF EXISTS] db
|
|
*
|
|
* Or:
|
|
* DROP DICTIONARY [IF EXISTS] [db.]name
|
|
*/
|
|
class ParserDropQuery : public IParserBase
|
|
{
|
|
protected:
|
|
const char * getName() const override{ return "DROP query"; }
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
|
|
|
bool parseDropQuery(Pos & pos, ASTPtr & node, Expected & expected);
|
|
bool parseDetachQuery(Pos & pos, ASTPtr & node, Expected & expected);
|
|
bool parseTruncateQuery(Pos & pos, ASTPtr & node, Expected & expected);
|
|
};
|
|
|
|
}
|