ClickHouse/dbms/src/Parsers/ASTQueryParameter.h

28 lines
728 B
C++
Raw Normal View History

2019-05-18 21:07:23 +00:00
#pragma once
#include <Parsers/ASTWithAlias.h>
namespace DB
{
/// Query parameter: name and type.
class ASTQueryParameter : public ASTWithAlias
{
public:
String name, type;
ASTQueryParameter(const String & name_, const String & type_) : name(name_), type(type_) {}
/** Get the text that identifies this element. */
String getID(char delim) const override { return "QueryParameter" + (delim + name + delim + type); }
2019-05-18 23:57:26 +00:00
ASTPtr clone() const override { return std::make_shared<ASTQueryParameter>(*this); }
2019-05-18 21:07:23 +00:00
protected:
void formatImplWithoutAlias(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
void appendColumnNameImpl(WriteBuffer & ostr) const override;
};
}