2019-10-07 16:23:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Parsers/IParserBase.h>
|
|
|
|
#include <Parsers/IAST_fwd.h>
|
|
|
|
#include <Parsers/CommonParsers.h>
|
|
|
|
#include <Parsers/ASTDictionaryAttributeDeclaration.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2019-10-08 13:26:15 +00:00
|
|
|
/// Parser for dictionary attribute declaration, similar with parser for table
|
|
|
|
/// column, but attributes has less parameters. Produces
|
|
|
|
/// ASTDictionaryAttributeDeclaration.
|
2019-10-07 16:23:16 +00:00
|
|
|
class ParserDictionaryAttributeDeclaration : public IParserBase
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
const char * getName() const override { return "attribute declaration"; }
|
|
|
|
|
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-10-08 13:26:15 +00:00
|
|
|
/// Creates ASTExpressionList consists of dictionary attributes declaration.
|
2019-10-07 16:23:16 +00:00
|
|
|
class ParserDictionaryAttributeDeclarationList : public IParserBase
|
|
|
|
{
|
|
|
|
protected:
|
2020-01-21 08:54:26 +00:00
|
|
|
const char * getName() const override{ return "attribute declaration list"; }
|
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
2019-10-07 16:23:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|