| 37 | |
| 38 | |
| 39 | NameSet analyzeReceiveQueryParams(const std::string & query) |
| 40 | { |
| 41 | NameToNameMap query_params; |
| 42 | const char * query_begin = query.data(); |
| 43 | const char * query_end = query.data() + query.size(); |
| 44 | |
| 45 | ParserQuery parser(query_end); |
| 46 | ASTPtr extract_query_ast = parseQuery(parser, query_begin, query_end, "analyzeReceiveQueryParams", 0, DBMS_DEFAULT_MAX_PARSER_DEPTH, DBMS_DEFAULT_MAX_PARSER_BACKTRACKS); |
| 47 | QueryParameterVisitor(query_params).visit(extract_query_ast); |
| 48 | |
| 49 | NameSet query_param_names; |
| 50 | for (const auto & query_param : query_params) |
| 51 | query_param_names.insert(query_param.first); |
| 52 | return query_param_names; |
| 53 | } |
| 54 | |
| 55 | NameSet analyzeReceiveQueryParams(const ASTPtr & ast) |
| 56 | { |
no test coverage detected