Adds a node to the referenced entities rax, in case it has labels or properties (inline filter).
| 78 | |
| 79 | // Adds a node to the referenced entities rax, in case it has labels or properties (inline filter). |
| 80 | static void _AST_MapReferencedNode(AST *ast, const cypher_astnode_t *node, bool force_mapping) { |
| 81 | |
| 82 | const cypher_astnode_t *properties = cypher_ast_node_pattern_get_properties(node); |
| 83 | // Disregard empty property maps. |
| 84 | if(properties && cypher_astnode_nchildren(properties) == 0) properties = NULL; |
| 85 | // A node with inlined filters is always referenced for the FilterTree. |
| 86 | // (In the case of a CREATE path, these are properties being set) |
| 87 | if(properties || force_mapping) { |
| 88 | const char *alias = AST_ToString(node); |
| 89 | _AST_UpdateRefMap(ast, alias); |
| 90 | |
| 91 | // Map any references within the properties map, such as 'b' in: |
| 92 | // ({val: ID(b)}) |
| 93 | if(properties) _AST_MapExpression(ast, properties); |
| 94 | } |
| 95 | } |
| 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) { |
no test coverage detected