Map the LHS of "AS" projected entities. "WITH a as x order by x" will just collect a to the map.
| 412 | |
| 413 | // Map the LHS of "AS" projected entities. "WITH a as x order by x" will just collect a to the map. |
| 414 | static void _AST_MapWithReferredEntities(AST *ast_segment, const cypher_astnode_t *with_clause) { |
| 415 | int projectionCount = cypher_ast_with_nprojections(with_clause); |
| 416 | for(uint i = 0 ; i < projectionCount; i ++) { |
| 417 | const cypher_astnode_t *projection = cypher_ast_with_get_projection(with_clause, i); |
| 418 | // The expression forms the LHS of the projection. |
| 419 | const cypher_astnode_t *exp = cypher_ast_projection_get_expression(projection); |
| 420 | _AST_MapExpression(ast_segment, exp); |
| 421 | } |
| 422 | // Add referenced aliases for WITH's ORDER BY entities. |
| 423 | const cypher_astnode_t *order_by = cypher_ast_with_get_order_by(with_clause); |
| 424 | if(order_by) _AST_MapOrderByReferences(ast_segment, order_by); |
| 425 | } |
| 426 | |
| 427 | // Map the LHS of "AS" projected entities. "RETURN a as x order by x" will just collect a to the map. |
| 428 | static void _AST_MapReturnReferredEntities(AST *ast_segment, |
no test coverage detected