MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / _AST_MapSetPropertyReferences

Function _AST_MapSetPropertyReferences

src/ast/ast_build_reference_map.c:155–167  ·  view source on GitHub ↗

Maps entities in SET clauses that update an individual property.

Source from the content-addressed store, hash-verified

153
154// Maps entities in SET clauses that update an individual property.
155static void _AST_MapSetPropertyReferences(AST *ast, const cypher_astnode_t *set_item) {
156 // Retrieve the alias being modified from the property descriptor.
157 const cypher_astnode_t *ast_prop = cypher_ast_set_property_get_property(set_item);
158 const cypher_astnode_t *ast_entity = cypher_ast_property_operator_get_expression(ast_prop);
159 ASSERT(cypher_astnode_type(ast_entity) == CYPHER_AST_IDENTIFIER);
160
161 const char *alias = cypher_ast_identifier_get_name(ast_entity);
162 _AST_UpdateRefMap(ast, alias);
163
164 // Map expression right hand side, e.g. a.v = 1, a.x = b.x
165 const cypher_astnode_t *set_exp = cypher_ast_set_property_get_expression(set_item);
166 _AST_MapExpression(ast, set_exp);
167}
168
169// maps entities in SET clauses that update labels
170static void _AST_MapSetLabelsReferences

Callers 1

Calls 2

_AST_UpdateRefMapFunction · 0.85
_AST_MapExpressionFunction · 0.85

Tested by

no test coverage detected