aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/library/yql/udfs/common/clickhouse/client/src/Parsers/ASTKillQueryQuery.cpp
blob: ca10f23e580d32634af3ea5acc06aacda2d82f4b (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
27
28
#include <Parsers/ASTKillQueryQuery.h> 
#include <IO/Operators.h>
 
namespace DB 
{ 
 
String ASTKillQueryQuery::getID(char delim) const 
{ 
    return String("KillQueryQuery") + delim + (where_expression ? where_expression->getID() : "") + delim + String(sync ? "SYNC" : "ASYNC"); 
} 
 
void ASTKillQueryQuery::formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const 
{ 
    settings.ostr << (settings.hilite ? hilite_keyword : "") << "KILL " 
        << (type == Type::Query ? "QUERY" : "MUTATION"); 
 
    formatOnCluster(settings); 
 
    if (where_expression) 
    { 
        settings.ostr << " WHERE " << (settings.hilite ? hilite_none : ""); 
        where_expression->formatImpl(settings, state, frame); 
    } 
 
    settings.ostr << " " << (settings.hilite ? hilite_keyword : "") << (test ? "TEST" : (sync ? "SYNC" : "ASYNC")) << (settings.hilite ? hilite_none : ""); 
} 
 
}