aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Parsers/ASTQueryParameter.cpp
blob: c10cced23ce65c3656391b57f37850e486bcc874 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <Parsers/ASTQueryParameter.h>
#include <IO/WriteHelpers.h>
#include <Common/quoteString.h>
#include <IO/Operators.h>


namespace DB
{

void ASTQueryParameter::formatImplWithoutAlias(const FormatSettings & settings, FormatState &, FormatStateStacked) const
{
    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 : "");
}

void ASTQueryParameter::appendColumnNameImpl(WriteBuffer & ostr) const
{
    writeString(name, ostr);
}

}