2016-06-07 08:23:15 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/IAST.h>
|
2016-06-07 08:23:15 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2018-10-14 15:30:06 +00:00
|
|
|
/** Name, type, default-specifier, default-expression, comment-expression.
|
2016-06-07 08:23:15 +00:00
|
|
|
* The type is optional if default-expression is specified.
|
|
|
|
*/
|
|
|
|
class ASTColumnDeclaration : public IAST
|
|
|
|
{
|
|
|
|
public:
|
2017-04-01 07:20:54 +00:00
|
|
|
String name;
|
|
|
|
ASTPtr type;
|
|
|
|
String default_specifier;
|
|
|
|
ASTPtr default_expression;
|
2018-11-08 12:03:42 +00:00
|
|
|
ASTPtr comment;
|
2019-06-16 16:47:47 +00:00
|
|
|
ASTPtr codec;
|
2019-04-15 09:30:45 +00:00
|
|
|
ASTPtr ttl;
|
2016-06-07 08:23:15 +00:00
|
|
|
|
2018-12-07 12:34:40 +00:00
|
|
|
String getID(char delim) const override { return "ColumnDeclaration" + (delim + name); }
|
2016-06-07 08:23:15 +00:00
|
|
|
|
2019-03-23 22:58:08 +00:00
|
|
|
ASTPtr clone() const override;
|
|
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
2016-06-07 08:23:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|