#pragma once #include #include namespace DB { class ASTSettingsProfileElements; /** CREATE ROLE [IF NOT EXISTS | OR REPLACE] name * [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE] | PROFILE 'profile_name'] [,...] * * ALTER ROLE [IF EXISTS] name * [RENAME TO new_name] * [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE] | PROFILE 'profile_name'] [,...] */ class ASTCreateRoleQuery : public IAST, public ASTQueryWithOnCluster { public: bool alter = false; bool attach = false; bool if_exists = false; bool if_not_exists = false; bool or_replace = false; Strings names; String new_name; std::shared_ptr settings; String getID(char) const override; ASTPtr clone() const override; void formatImpl(const FormatSettings & format, FormatState &, FormatStateStacked) const override; ASTPtr getRewrittenASTWithoutOnCluster(const std::string &) const override { return removeOnCluster(clone()); } }; }