ClickHouse/src/Interpreters/InterpreterCreateFunctionQuery.h

33 lines
741 B
C++
Raw Normal View History

#pragma once
#include <Interpreters/IInterpreter.h>
2021-08-23 14:31:58 +00:00
namespace DB
{
2021-07-19 23:34:04 +00:00
class Context;
2021-08-18 09:29:52 +00:00
class InterpreterCreateFunctionQuery : public IInterpreter, WithContext
{
public:
2021-08-18 09:29:52 +00:00
InterpreterCreateFunctionQuery(const ASTPtr & query_ptr_, ContextPtr context_, bool is_internal_)
: WithContext(context_)
, query_ptr(query_ptr_)
, is_internal(is_internal_) {}
BlockIO execute() override;
void setInternal(bool internal_);
private:
static void validateFunction(ASTPtr function, const String & name);
static std::unordered_set<String> getIdentifiers(ASTPtr node);
static void validateFunctionRecursiveness(ASTPtr node, const String & function_to_create);
ASTPtr query_ptr;
2021-08-18 09:29:52 +00:00
bool is_internal;
};
}