2022-11-11 21:19:58 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
#include <Parsers/ASTQueryWithOnCluster.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTDropNamedCollectionQuery : public IAST, public ASTQueryWithOnCluster
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string collection_name;
|
|
|
|
bool if_exists = false;
|
|
|
|
|
|
|
|
String getID(char) const override { return "DropNamedCollectionQuery"; }
|
|
|
|
|
|
|
|
ASTPtr clone() const override;
|
|
|
|
|
|
|
|
void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override;
|
|
|
|
|
|
|
|
ASTPtr getRewrittenASTWithoutOnCluster(const WithoutOnClusterASTRewriteParams &) const override { return removeOnCluster<ASTDropNamedCollectionQuery>(clone()); }
|
2023-02-02 01:11:16 +00:00
|
|
|
|
|
|
|
QueryKind getQueryKind() const override { return QueryKind::Drop; }
|
2022-11-11 21:19:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|