aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Parsers/Access/ParserSetRoleQuery.h
blob: 7e59f08e7b037a0cef6e8791215624a0860d3a37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include <Parsers/IParserBase.h>


namespace DB
{
/** Parses queries like
  * SET ROLE {DEFAULT | NONE | role [,...] | ALL | ALL EXCEPT role [,...]}
  * SET DEFAULT ROLE {NONE | role [,...] | ALL | ALL EXCEPT role [,...]} TO {user|CURRENT_USER} [,...]
  */
class ParserSetRoleQuery : public IParserBase
{
protected:
    const char * getName() const override { return "SET ROLE or SET DEFAULT ROLE query"; }
    bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
};
}