2021-05-09 09:47:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Interpreters/IInterpreter.h>
|
|
|
|
#include <Parsers/ASTCreateFunctionQuery.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTCreateFunctionQuery;
|
|
|
|
|
|
|
|
class InterpreterCreateFunctionQuery : public IInterpreter, WithContext
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
InterpreterCreateFunctionQuery(const ASTPtr & query_ptr_, ContextPtr context_) : WithContext(context_), query_ptr(query_ptr_) {}
|
|
|
|
|
|
|
|
BlockIO execute() override;
|
|
|
|
|
2021-05-10 22:35:22 +00:00
|
|
|
private:
|
|
|
|
static void validateFunction(ASTPtr function);
|
|
|
|
static void getIdentifiers(ASTPtr node, std::vector<String> & identifiers);
|
|
|
|
|
2021-05-09 09:47:29 +00:00
|
|
|
private:
|
|
|
|
ASTPtr query_ptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|