| 228 | |
| 229 | |
| 230 | static 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 | |
| 248 | const char * getInsertData(const ASTPtr & ast) |
| 249 | { |
no outgoing calls
no test coverage detected