ClickHouse/dbms/src/Parsers/ASTKillQueryQuery.cpp

22 lines
525 B
C++
Raw Normal View History

2016-11-30 17:31:05 +00:00
#include <DB/Parsers/ASTKillQueryQuery.h>
namespace DB
{
2017-01-24 13:39:39 +00:00
String ASTKillQueryQuery::getID() const
{
return "KillQueryQuery_" + (where_expression ? where_expression->getID() : "") + "_" + String(sync ? "SYNC" : "ASYNC");
}
void ASTKillQueryQuery::formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const
{
settings.ostr << "KILL QUERY WHERE ";
if (where_expression)
where_expression->formatImpl(settings, state, frame);
settings.ostr << (sync ? " SYNC" : " ASYNC");
}
2016-11-30 17:31:05 +00:00
}