2020-02-17 02:59:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Interpreters/IInterpreter.h>
|
|
|
|
#include <Parsers/IAST_fwd.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2021-04-10 23:33:54 +00:00
|
|
|
|
2020-02-17 02:59:56 +00:00
|
|
|
class ASTCreateRoleQuery;
|
|
|
|
struct Role;
|
|
|
|
|
2021-05-31 14:49:02 +00:00
|
|
|
class InterpreterCreateRoleQuery : public IInterpreter, WithMutableContext
|
2020-02-17 02:59:56 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-05-31 14:49:02 +00:00
|
|
|
InterpreterCreateRoleQuery(const ASTPtr & query_ptr_, ContextMutablePtr context_) : WithMutableContext(context_), query_ptr(query_ptr_) {}
|
2020-02-17 02:59:56 +00:00
|
|
|
|
|
|
|
BlockIO execute() override;
|
|
|
|
|
2020-02-21 19:27:12 +00:00
|
|
|
static void updateRoleFromQuery(Role & role, const ASTCreateRoleQuery & query);
|
2020-02-17 02:59:56 +00:00
|
|
|
|
2020-02-21 19:27:12 +00:00
|
|
|
private:
|
2020-02-17 02:59:56 +00:00
|
|
|
ASTPtr query_ptr;
|
|
|
|
};
|
2021-04-10 23:33:54 +00:00
|
|
|
|
2020-02-17 02:59:56 +00:00
|
|
|
}
|