ClickHouse/dbms/src/Parsers/ASTRoleList.h

26 lines
674 B
C++
Raw Normal View History

2019-12-01 22:01:05 +00:00
#pragma once
#include <Parsers/IAST.h>
#include <Access/Quota.h>
namespace DB
{
/// {role|CURRENT_USER} [,...] | NONE | ALL | ALL EXCEPT {role|CURRENT_USER} [,...]
class ASTRoleList : public IAST
{
public:
Strings names;
2019-12-01 22:01:05 +00:00
bool current_user = false;
bool all = false;
Strings except_names;
2019-12-01 22:01:05 +00:00
bool except_current_user = false;
bool empty() const { return names.empty() && !current_user && !all; }
2019-12-01 22:01:05 +00:00
String getID(char) const override { return "RoleList"; }
ASTPtr clone() const override { return std::make_shared<ASTRoleList>(*this); }
void formatImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
};
}