1 | #pragma once |
2 | |
3 | #include <Parsers/IAST.h> |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | /** Name, type, default-specifier, default-expression, comment-expression. |
9 | * The type is optional if default-expression is specified. |
10 | */ |
11 | class ASTColumnDeclaration : public IAST |
12 | { |
13 | public: |
14 | String name; |
15 | ASTPtr type; |
16 | String default_specifier; |
17 | ASTPtr default_expression; |
18 | ASTPtr comment; |
19 | ASTPtr codec; |
20 | ASTPtr ttl; |
21 | |
22 | String getID(char delim) const override { return "ColumnDeclaration" + (delim + name); } |
23 | |
24 | ASTPtr clone() const override; |
25 | void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override; |
26 | }; |
27 | |
28 | } |
29 | |