2019-12-01 22:01:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Parsers/IAST.h>
|
2019-11-29 17:22:56 +00:00
|
|
|
#include <Access/RowPolicy.h>
|
2019-12-01 22:01:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2020-02-17 02:59:56 +00:00
|
|
|
/** DROP USER [IF EXISTS] name [,...]
|
|
|
|
* DROP ROLE [IF EXISTS] name [,...]
|
|
|
|
* DROP QUOTA [IF EXISTS] name [,...]
|
2019-11-29 17:22:56 +00:00
|
|
|
* DROP [ROW] POLICY [IF EXISTS] name [,...] ON [database.]table [,...]
|
2020-03-18 14:11:44 +00:00
|
|
|
* DROP [SETTINGS] PROFILE [IF EXISTS] name [,...]
|
2019-12-01 22:01:05 +00:00
|
|
|
*/
|
|
|
|
class ASTDropAccessEntityQuery : public IAST
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class Kind
|
|
|
|
{
|
2020-02-04 22:37:04 +00:00
|
|
|
USER,
|
2020-02-17 02:59:56 +00:00
|
|
|
ROLE,
|
2019-12-01 22:01:05 +00:00
|
|
|
QUOTA,
|
2019-11-29 17:22:56 +00:00
|
|
|
ROW_POLICY,
|
2020-03-18 14:11:44 +00:00
|
|
|
SETTINGS_PROFILE,
|
2019-12-01 22:01:05 +00:00
|
|
|
};
|
2020-02-04 22:37:04 +00:00
|
|
|
|
2019-12-01 22:01:05 +00:00
|
|
|
const Kind kind;
|
|
|
|
bool if_exists = false;
|
|
|
|
Strings names;
|
2019-11-29 17:22:56 +00:00
|
|
|
std::vector<RowPolicy::FullNameParts> row_policies_names;
|
2019-12-01 22:01:05 +00:00
|
|
|
|
|
|
|
ASTDropAccessEntityQuery(Kind kind_);
|
|
|
|
String getID(char) const override;
|
|
|
|
ASTPtr clone() const override;
|
|
|
|
void formatImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
|
|
|
|
};
|
|
|
|
}
|