2011-11-05 23:31:19 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#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:
|
2023-09-21 13:20:18 +00:00
|
|
|
* DROP TABLE [IF EXISTS|EMPTY] [db.]name [PERMANENTLY]
|
|
|
|
*
|
|
|
|
* Or:
|
|
|
|
* DETACH|TRUNCATE TABLE [IF EXISTS] [db.]name [PERMANENTLY]
|
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:
|
2020-01-21 08:54:26 +00:00
|
|
|
const char * getName() const override{ return "DROP query"; }
|
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
2011-11-05 23:31:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|