mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
42 lines
903 B
C++
42 lines
903 B
C++
#pragma once
|
|
|
|
#include <Parsers/ASTQueryWithOutput.h>
|
|
#include <Access/RowPolicy.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
/** SHOW CREATE QUOTA [name | CURRENT]
|
|
* SHOW CREATE [ROW] POLICY name ON [database.]table
|
|
* SHOW CREATE USER [name | CURRENT_USER]
|
|
* SHOW CREATE ROLE name
|
|
* SHOW CREATE [SETTINGS] PROFILE name
|
|
*/
|
|
class ASTShowCreateAccessEntityQuery : public ASTQueryWithOutput
|
|
{
|
|
public:
|
|
enum class Kind
|
|
{
|
|
USER,
|
|
ROLE,
|
|
QUOTA,
|
|
ROW_POLICY,
|
|
SETTINGS_PROFILE,
|
|
};
|
|
|
|
const Kind kind;
|
|
String name;
|
|
bool current_quota = false;
|
|
bool current_user = false;
|
|
RowPolicy::FullNameParts row_policy_name;
|
|
|
|
ASTShowCreateAccessEntityQuery(Kind kind_);
|
|
String getID(char) const override;
|
|
ASTPtr clone() const override;
|
|
|
|
protected:
|
|
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
|
|
};
|
|
|
|
}
|