ClickHouse/src/Parsers/ASTQueryParameter.cpp

26 lines
748 B
C++
Raw Normal View History

2019-05-18 21:07:23 +00:00
#include <Parsers/ASTQueryParameter.h>
#include <IO/WriteHelpers.h>
#include <Common/quoteString.h>
2019-05-18 21:07:23 +00:00
namespace DB
{
void ASTQueryParameter::formatImplWithoutAlias(const FormatSettings & settings, FormatState &, FormatStateStacked) const
{
2019-06-15 17:52:53 +00:00
settings.ostr
<< (settings.hilite ? hilite_substitution : "") << '{'
<< (settings.hilite ? hilite_identifier : "") << backQuoteIfNeed(name)
<< (settings.hilite ? hilite_substitution : "") << ':'
<< (settings.hilite ? hilite_identifier : "") << type
<< (settings.hilite ? hilite_substitution : "") << '}'
<< (settings.hilite ? hilite_none : "");
2019-05-18 21:07:23 +00:00
}
void ASTQueryParameter::appendColumnNameImpl(WriteBuffer & ostr) const
{
writeString(name, ostr);
}
}