2020-02-04 22:37:04 +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-04 22:37:04 +00:00
|
|
|
class ASTCreateUserQuery;
|
|
|
|
struct User;
|
|
|
|
|
2021-05-31 14:49:02 +00:00
|
|
|
class InterpreterCreateUserQuery : public IInterpreter, WithMutableContext
|
2020-02-04 22:37:04 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-05-31 14:49:02 +00:00
|
|
|
InterpreterCreateUserQuery(const ASTPtr & query_ptr_, ContextMutablePtr context_) : WithMutableContext(context_), query_ptr(query_ptr_) {}
|
2020-02-04 22:37:04 +00:00
|
|
|
|
|
|
|
BlockIO execute() override;
|
|
|
|
|
2020-02-21 19:27:12 +00:00
|
|
|
static void updateUserFromQuery(User & user, const ASTCreateUserQuery & query);
|
2020-02-04 22:37:04 +00:00
|
|
|
|
2020-02-21 19:27:12 +00:00
|
|
|
private:
|
2020-02-04 22:37:04 +00:00
|
|
|
ASTPtr query_ptr;
|
|
|
|
};
|
2021-04-10 23:33:54 +00:00
|
|
|
|
2020-02-04 22:37:04 +00:00
|
|
|
}
|