ClickHouse/src/Parsers/ParserShowCreateAccessEntityQuery.h
Vitaly Baranov 9fe47df2e8 Support multiple users/roles in SHOW CREATE USER(ROLE, etc.) and SHOW GRANTS FOR commands.
Support syntax "SHOW CREATE USER ALL" and "SHOW GRANTS FOR ALL".
2020-06-15 22:07:47 +03:00

27 lines
825 B
C++

#pragma once
#include <Parsers/IParserBase.h>
namespace DB
{
/** Parses queries like
* SHOW CREATE USER [name | CURRENT_USER]
* SHOW CREATE USERS [name [, name2 ...]
* SHOW CREATE ROLE name
* SHOW CREATE ROLES [name [, name2 ...]]
* SHOW CREATE [SETTINGS] PROFILE name
* SHOW CREATE [SETTINGS] PROFILES [name [, name2 ...]]
* SHOW CREATE [ROW] POLICY name ON [database.]table
* SHOW CREATE [ROW] POLICIES [name ON [database.]table [, name2 ON database2.table2 ...] | name | ON database.table]
* SHOW CREATE QUOTA [name]
* SHOW CREATE QUOTAS [name [, name2 ...]]
*/
class ParserShowCreateAccessEntityQuery : public IParserBase
{
protected:
const char * getName() const override { return "SHOW CREATE QUOTA query"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
};
}