mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
52 lines
1020 B
C++
52 lines
1020 B
C++
#pragma once
|
|
|
|
#include <Parsers/IAST.h>
|
|
#include <Parsers/IParserBase.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
namespace ErrorCodes
|
|
{
|
|
extern const int NOT_IMPLEMENTED;
|
|
}
|
|
|
|
namespace MySQLParser
|
|
{
|
|
|
|
class ASTCreateQuery : public IAST
|
|
{
|
|
public:
|
|
bool temporary{false};
|
|
bool if_not_exists{false};
|
|
|
|
String table;
|
|
String database;
|
|
ASTPtr like_table;
|
|
ASTPtr columns_list;
|
|
ASTPtr table_options;
|
|
ASTPtr partition_options;
|
|
|
|
ASTPtr clone() const override;
|
|
|
|
String getID(char) const override { return "create query"; }
|
|
|
|
protected:
|
|
void formatImpl(const FormatSettings & /*settings*/, FormatState & /*state*/, FormatStateStacked /*frame*/) const override
|
|
{
|
|
throw Exception("Method formatImpl is not supported by MySQLParser::ASTCreateQuery.", ErrorCodes::NOT_IMPLEMENTED);
|
|
}
|
|
};
|
|
|
|
class ParserCreateQuery : public IParserBase
|
|
{
|
|
protected:
|
|
const char * getName() const override { return "create query"; }
|
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
|
};
|
|
|
|
}
|
|
|
|
}
|