Adds an edge to the referenced entities rax if it has multiple types or any properties (inline filter).
| 96 | |
| 97 | // Adds an edge to the referenced entities rax if it has multiple types or any properties (inline filter). |
| 98 | static void _AST_MapReferencedEdge(AST *ast, const cypher_astnode_t *edge, bool force_mapping) { |
| 99 | |
| 100 | const cypher_astnode_t *properties = cypher_ast_rel_pattern_get_properties(edge); |
| 101 | // Disregard empty property maps. |
| 102 | if(properties && cypher_astnode_nchildren(properties) == 0) properties = NULL; |
| 103 | // An edge with inlined filters is always referenced for the FilterTree. |
| 104 | // (In the case of a CREATE path, these are properties being set) |
| 105 | if(properties || force_mapping) { |
| 106 | const char *alias = AST_ToString(edge); |
| 107 | _AST_UpdateRefMap(ast, alias); |
| 108 | |
| 109 | // Map any references within the properties map, such as 'b' in: |
| 110 | // ({val: ID(b)}) |
| 111 | if(properties) _AST_MapExpression(ast, properties); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | // Maps entities in a given path. |
| 116 | static void _AST_MapReferencedEntitiesInPath(AST *ast, const cypher_astnode_t *path, |
no test coverage detected