1 | #include <Parsers/ASTKillQueryQuery.h> |
---|---|
2 | |
3 | namespace DB |
4 | { |
5 | |
6 | String ASTKillQueryQuery::getID(char delim) const |
7 | { |
8 | return String("KillQueryQuery") + delim + (where_expression ? where_expression->getID() : "") + delim + String(sync ? "SYNC": "ASYNC"); |
9 | } |
10 | |
11 | void ASTKillQueryQuery::formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const |
12 | { |
13 | settings.ostr << (settings.hilite ? hilite_keyword : "") << "KILL " |
14 | << (type == Type::Query ? "QUERY": "MUTATION"); |
15 | |
16 | formatOnCluster(settings); |
17 | |
18 | if (where_expression) |
19 | { |
20 | settings.ostr << " WHERE "<< (settings.hilite ? hilite_none : ""); |
21 | where_expression->formatImpl(settings, state, frame); |
22 | } |
23 | |
24 | settings.ostr << " "<< (settings.hilite ? hilite_keyword : "") << (test ? "TEST": (sync ? "SYNC": "ASYNC")) << (settings.hilite ? hilite_none : ""); |
25 | } |
26 | |
27 | } |
28 |