ClickHouse/dbms/Parsers/ASTColumnDeclaration.h

29 lines
649 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-11-08 12:03:42 +00:00
ASTPtr comment;
2019-06-16 16:47:47 +00:00
ASTPtr codec;
ASTPtr ttl;
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;
};
}