MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getInsertAST

Function getInsertAST

src/Parsers/parseQuery.cpp:230–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228
229
230static ASTInsertQuery * getInsertAST(const ASTPtr & ast)
231{
232 /// Either it is INSERT or EXPLAIN INSERT.
233 if (auto * explain = ast->as<ASTExplainQuery>())
234 {
235 if (auto explained_query = explain->getExplainedQuery())
236 {
237 return explained_query->as<ASTInsertQuery>();
238 }
239 }
240 else
241 {
242 return ast->as<ASTInsertQuery>();
243 }
244
245 return nullptr;
246}
247
248const char * getInsertData(const ASTPtr & ast)
249{

Callers 2

getInsertDataFunction · 0.85
splitMultipartQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected