Maps the RHS of "AS" projected entities.
| 54 | |
| 55 | // Maps the RHS of "AS" projected entities. |
| 56 | static inline void _AST_MapProjectionAlias(AST *ast, const cypher_astnode_t *projection) { |
| 57 | const cypher_astnode_t *ast_alias = cypher_ast_projection_get_alias(projection); |
| 58 | if(ast_alias == NULL) { |
| 59 | // The projection was not aliased, so the projection itself must be an identifier. |
| 60 | ast_alias = cypher_ast_projection_get_expression(projection); |
| 61 | ASSERT(cypher_astnode_type(ast_alias) == CYPHER_AST_IDENTIFIER); |
| 62 | } |
| 63 | // WITH and RETURN projections are always either aliased or themselves identifiers. |
| 64 | const char *alias = cypher_ast_identifier_get_name(ast_alias); |
| 65 | _AST_UpdateRefMap(ast, alias); |
| 66 | } |
| 67 | |
| 68 | // Adds referenced entities of ORDER BY clause. |
| 69 | static void _AST_MapOrderByReferences(AST *ast, const cypher_astnode_t *order_by) { |
no test coverage detected