ClickHouse/dbms/src/Parsers/ASTColumnDeclaration.h

28 lines
633 B
C++
Raw Normal View History

#pragma once
#include <Parsers/IAST.h>
namespace DB
{
/** Name, type, default-specifier, default-expression, comment-expression.
* The type is optional if default-expression is specified.
*/
class ASTColumnDeclaration : public IAST
{
public:
String name;
ASTPtr type;
String default_specifier;
ASTPtr default_expression;
2018-10-11 02:57:48 +00:00
ASTPtr codec;
2018-11-08 12:03:42 +00:00
ASTPtr comment;
String getID(char delim) const override { return "ColumnDeclaration" + (delim + name); }
2019-03-23 22:58:08 +00:00
ASTPtr clone() const override;
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
};
}