| 644 | } |
| 645 | |
| 646 | const char *_AST_ExtractQueryString |
| 647 | ( |
| 648 | const cypher_parse_result_t *partial_result |
| 649 | ) { |
| 650 | // Retrieve the AST root node from a parsed query. |
| 651 | const cypher_astnode_t *statement = _AST_parse_result_root(partial_result); |
| 652 | // We are parsing with the CYPHER_PARSE_ONLY_PARAMETERS flag. |
| 653 | // Given that, only the parameters were processed. extract the actual query and return to caller. |
| 654 | ASSERT(cypher_astnode_type(statement) == CYPHER_AST_STATEMENT); |
| 655 | const cypher_astnode_t *body = cypher_ast_statement_get_body(statement); |
| 656 | ASSERT(cypher_astnode_type(body) == CYPHER_AST_STRING); |
| 657 | return cypher_ast_string_get_value(body); |
| 658 | } |
| 659 | |
| 660 | inline AST_AnnotationCtxCollection *AST_GetAnnotationCtxCollection |
| 661 | ( |
no test coverage detected