blob: 5399c394137a13b3125e2fe237fc01bd5d940cee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#pragma once
#include <Core/Field.h>
#include <Parsers/IAST.h>
#include <Parsers/IParserBase.h>
namespace DB
{
namespace ErrorCodes
{
extern const int NOT_IMPLEMENTED;
}
namespace MySQLParser
{
class ASTDeclareIndex: public IAST
{
public:
String index_name;
String index_type;
ASTPtr index_columns;
ASTPtr index_options;
ASTPtr reference_definition;
ASTPtr clone() const override;
String getID(char /*delimiter*/) const override { return "index declaration"; }
protected:
void formatImpl(const FormatSettings & /*settings*/, FormatState & /*state*/, FormatStateStacked /*frame*/) const override
{
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method formatImpl is not supported by MySQLParser::ASTDeclareIndex.");
}
};
class ParserDeclareIndex : public IParserBase
{
protected:
const char * getName() const override { return "index declaration"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
};
}
}
|