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

Function _AST_MapMatchClauseReferences

src/ast/ast_build_reference_map.c:128–141  ·  view source on GitHub ↗

Add referenced aliases from MATCH clause - inline filtered and explicit WHERE filter.

Source from the content-addressed store, hash-verified

126
127// Add referenced aliases from MATCH clause - inline filtered and explicit WHERE filter.
128static void _AST_MapMatchClauseReferences(AST *ast, const cypher_astnode_t *match_clause) {
129 // Inline filters.
130 const cypher_astnode_t *pattern = cypher_ast_match_get_pattern(match_clause);
131 uint path_count = cypher_ast_pattern_npaths(pattern);
132 for(uint i = 0; i < path_count; i++) {
133 const cypher_astnode_t *path = cypher_ast_pattern_get_path(pattern, i);
134 bool force_mapping = _shouldForceMapping(path);
135 _AST_MapReferencedEntitiesInPath(ast, path, force_mapping);
136 }
137
138 // Where clause.
139 const cypher_astnode_t *predicate = cypher_ast_match_get_predicate(match_clause);
140 if(predicate) _AST_MapExpression(ast, predicate);
141}
142
143// Add referenced aliases from CREATE clause.
144static void _AST_MapCreateClauseReferences(AST *ast, const cypher_astnode_t *create_clause) {

Callers 1

Calls 3

_shouldForceMappingFunction · 0.85
_AST_MapExpressionFunction · 0.85

Tested by

no test coverage detected