1#pragma once
2
3#include <Parsers/IAST.h>
4#include <Parsers/ASTExpressionList.h>
5
6namespace DB
7{
8
9/// AST for single dictionary attribute in dictionary DDL query
10class ASTDictionaryAttributeDeclaration : public IAST
11{
12public:
13 /// Attribute name
14 String name;
15 /// Attribute type
16 ASTPtr type;
17 /// Attribute default value
18 ASTPtr default_value;
19 /// Attribute expression
20 ASTPtr expression;
21 /// Is atribute mirrored to the parent identifier
22 bool hierarchical;
23 /// Flag that shows whether the id->attribute image is injective
24 bool injective;
25 /// MongoDB object ID
26 bool is_object_id;
27
28 String getID(char delim) const override { return "DictionaryAttributeDeclaration" + (delim + name); }
29
30 ASTPtr clone() const override;
31 void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
32};
33
34}
35