ClickHouse/src/Parsers/ASTNameTypePair.h

30 lines
553 B
C++
Raw Normal View History

2011-08-18 18:48:00 +00:00
#pragma once
#include <Parsers/IAST.h>
2011-08-18 18:48:00 +00:00
namespace DB
{
2017-05-27 17:27:16 +00:00
/** A pair of the name and type. For example, browser FixedString(2).
2011-08-18 18:48:00 +00:00
*/
class ASTNameTypePair : public IAST
{
public:
2017-05-27 17:27:16 +00:00
/// name
String name;
2017-05-27 17:27:16 +00:00
/// type
ASTPtr type;
2011-08-18 18:48:00 +00:00
2017-05-27 17:27:16 +00:00
/** Get the text that identifies this element. */
String getID(char delim) const override { return "NameTypePair" + (delim + name); }
ASTPtr clone() const override;
protected:
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
2011-08-18 18:48:00 +00:00
};
2011-08-18 18:48:00 +00:00
}