1 | #pragma once |
---|---|
2 | |
3 | #include <Parsers/ASTQueryWithOutput.h> |
4 | #include <Access/RowPolicy.h> |
5 | |
6 | |
7 | namespace DB |
8 | { |
9 | /** SHOW CREATE QUOTA [name | CURRENT] |
10 | * SHOW CREATE [ROW] POLICY name ON [database.]table |
11 | */ |
12 | class ASTShowCreateAccessEntityQuery : public ASTQueryWithOutput |
13 | { |
14 | public: |
15 | enum class Kind |
16 | { |
17 | QUOTA, |
18 | ROW_POLICY, |
19 | }; |
20 | const Kind kind; |
21 | const char * const keyword; |
22 | String name; |
23 | bool current_quota = false; |
24 | RowPolicy::FullNameParts row_policy_name; |
25 | |
26 | ASTShowCreateAccessEntityQuery(Kind kind_); |
27 | String getID(char) const override; |
28 | ASTPtr clone() const override; |
29 | |
30 | protected: |
31 | void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override; |
32 | }; |
33 | |
34 | } |
35 |