ClickHouse/dbms/src/Parsers/ParserDropQuery.h

31 lines
717 B
C++
Raw Normal View History

2011-11-05 23:31:19 +00:00
#pragma once
#include <Parsers/IParserBase.h>
#include <Parsers/ExpressionElementParsers.h>
2011-11-05 23:31:19 +00:00
namespace DB
{
2017-05-27 17:29:55 +00:00
/** Query like this:
2018-04-21 00:35:20 +00:00
* DROP|DETACH|TRUNCATE TABLE [IF EXISTS] [db.]name
2011-11-05 23:31:19 +00:00
*
2017-05-27 17:29:55 +00:00
* Or:
2011-11-05 23:31:19 +00:00
* DROP DATABASE [IF EXISTS] db
2019-10-08 11:10:29 +00:00
*
* Or:
* DROP DICTIONARY [IF EXISTS] [db.]name
2011-11-05 23:31:19 +00:00
*/
class ParserDropQuery : public IParserBase
{
protected:
const char * getName() const override{ return "DROP query"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
2018-04-21 00:35:20 +00:00
bool parseDropQuery(Pos & pos, ASTPtr & node, Expected & expected);
2018-11-26 00:56:50 +00:00
bool parseDetachQuery(Pos & pos, ASTPtr & node, Expected & expected);
2018-04-21 00:35:20 +00:00
bool parseTruncateQuery(Pos & pos, ASTPtr & node, Expected & expected);
2011-11-05 23:31:19 +00:00
};
}