mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-10 18:40:52 +00:00
59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
|
#pragma once
|
||
|
#include <Parsers/IAST.h>
|
||
|
#include <AggregateFunctions/AggregateFunctionCount.h>
|
||
|
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
class ASTSystemQuery : public IAST
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
enum class Type
|
||
|
{
|
||
|
_UNKNOWN,
|
||
|
SHUTDOWN,
|
||
|
KILL,
|
||
|
DROP_DNS_CACHE,
|
||
|
DROP_MARK_CACHE,
|
||
|
DROP_UNCOMPRESSED_CACHE,
|
||
|
STOP_LISTEN_QUERIES,
|
||
|
START_LISTEN_QUERIES,
|
||
|
RESTART_REPLICAS,
|
||
|
SYNC_REPLICA,
|
||
|
RELOAD_DICTIONARY,
|
||
|
RELOAD_DICTIONARIES,
|
||
|
STOP_MERGES,
|
||
|
START_MERGES,
|
||
|
STOP_REPLICATION_QUEUES,
|
||
|
START_REPLICATION_QUEUES,
|
||
|
_END
|
||
|
};
|
||
|
|
||
|
static const char * typeToString(Type type);
|
||
|
|
||
|
Type type = Type::_UNKNOWN;
|
||
|
|
||
|
String target_dictionary;
|
||
|
//String target_replica;
|
||
|
|
||
|
ASTSystemQuery() = default;
|
||
|
explicit ASTSystemQuery(const StringRange range) : IAST(range) {}
|
||
|
|
||
|
String getID() const override { return "SYSTEM"; };
|
||
|
|
||
|
ASTPtr clone() const override { return std::make_shared<ASTSystemQuery>(*this); }
|
||
|
|
||
|
~ASTSystemQuery() override = default;
|
||
|
|
||
|
protected:
|
||
|
|
||
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override
|
||
|
{
|
||
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << "SYSTEM " << (settings.hilite ? hilite_none : "");
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
}
|