1#pragma once
2
3#include <Parsers/IAST.h>
4#include <Access/RowPolicy.h>
5
6
7namespace DB
8{
9
10/** DROP QUOTA [IF EXISTS] name [,...]
11 * DROP [ROW] POLICY [IF EXISTS] name [,...] ON [database.]table [,...]
12 */
13class ASTDropAccessEntityQuery : public IAST
14{
15public:
16 enum class Kind
17 {
18 QUOTA,
19 ROW_POLICY,
20 };
21 const Kind kind;
22 const char * const keyword;
23 bool if_exists = false;
24 Strings names;
25 std::vector<RowPolicy::FullNameParts> row_policies_names;
26
27 ASTDropAccessEntityQuery(Kind kind_);
28 String getID(char) const override;
29 ASTPtr clone() const override;
30 void formatImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
31};
32}
33