MCPcopy Create free account
hub / github.com/ByConity/ByConity / tryFindInputFunctionImpl

Function tryFindInputFunctionImpl

src/Parsers/ASTInsertQuery.cpp:134–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132
133
134static void tryFindInputFunctionImpl(const ASTPtr & ast, ASTPtr & input_function)
135{
136 if (!ast)
137 return;
138 for (const auto & child : ast->children)
139 tryFindInputFunctionImpl(child, input_function);
140
141 if (const auto * table_function_ast = ast->as<ASTFunction>())
142 {
143 if (table_function_ast->name == "input")
144 {
145 if (input_function)
146 throw Exception("You can use 'input()' function only once per request.", ErrorCodes::INVALID_USAGE_OF_INPUT);
147 input_function = ast;
148 }
149 }
150}
151
152
153void ASTInsertQuery::tryFindInputFunction(ASTPtr & input_function) const

Callers 1

tryFindInputFunctionMethod · 0.85

Calls 1

ExceptionClass · 0.50

Tested by

no test coverage detected