2011-08-18 18:48:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#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
|
2011-08-18 18:48:00 +00:00
|
|
|
String name;
|
2017-05-27 17:27:16 +00:00
|
|
|
/// type
|
2011-08-18 18:48:00 +00:00
|
|
|
ASTPtr type;
|
|
|
|
|
2017-05-27 17:27:16 +00:00
|
|
|
/** Get the text that identifies this element. */
|
2018-12-07 12:34:40 +00:00
|
|
|
String getID(char delim) const override { return "NameTypePair" + (delim + name); }
|
2020-06-01 21:11:08 +00:00
|
|
|
ASTPtr clone() const override;
|
2015-08-05 21:38:31 +00:00
|
|
|
|
|
|
|
protected:
|
2020-06-01 21:11:08 +00:00
|
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
2011-08-18 18:48:00 +00:00
|
|
|
};
|
|
|
|
|
2015-12-21 13:15:13 +00:00
|
|
|
|
2011-08-18 18:48:00 +00:00
|
|
|
}
|
|
|
|
|