blob: 8ce167ba7db9f9d8e9dc2d642e962560a7edc043 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include <Parsers/IAST.h>
#include <Parsers/ASTQueryWithOnCluster.h>
namespace DB
{
class ASTCreateFunctionQuery : public IAST, public ASTQueryWithOnCluster
{
public:
ASTPtr function_name;
ASTPtr function_core;
bool or_replace = false;
bool if_not_exists = false;
String getID(char delim) const override { return "CreateFunctionQuery" + (delim + getFunctionName()); }
ASTPtr clone() const override;
void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override;
ASTPtr getRewrittenASTWithoutOnCluster(const WithoutOnClusterASTRewriteParams &) const override { return removeOnCluster<ASTCreateFunctionQuery>(clone()); }
String getFunctionName() const;
QueryKind getQueryKind() const override { return QueryKind::Create; }
};
}
|