ClickHouse/dbms/src/Parsers/ASTKillQueryQuery.h

28 lines
822 B
C++
Raw Normal View History

#include <Parsers/IAST.h>
#include <Parsers/ASTQueryWithOutput.h>
2016-11-30 17:31:05 +00:00
namespace DB
{
2017-01-24 13:39:39 +00:00
class ASTKillQueryQuery : public ASTQueryWithOutput
2016-11-30 17:31:05 +00:00
{
public:
ASTPtr where_expression; // expression to filter processes from system.processes table
bool sync = false; // SYNC or ASYNC mode
bool test = false; // does it TEST mode? (doesn't cancel queries just checks and shows them)
2016-11-30 17:31:05 +00:00
ASTPtr clone() const override
{
auto clone = std::make_shared<ASTKillQueryQuery>(*this);
clone->where_expression = where_expression->clone();
clone->children = {clone->where_expression};
return std::move(clone);
}
2016-11-30 17:31:05 +00:00
String getID() const override;
2016-11-30 17:31:05 +00:00
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
2016-11-30 17:31:05 +00:00
};
}