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

Function _AST_MapReferencedEntitiesInPath

src/ast/ast_build_reference_map.c:116–125  ·  view source on GitHub ↗

Maps entities in a given path.

Source from the content-addressed store, hash-verified

114
115// Maps entities in a given path.
116static void _AST_MapReferencedEntitiesInPath(AST *ast, const cypher_astnode_t *path,
117 bool force_mapping) {
118 uint path_len = cypher_ast_pattern_path_nelements(path);
119 // Node are in even positions.
120 for(uint i = 0; i < path_len; i += 2)
121 _AST_MapReferencedNode(ast, cypher_ast_pattern_path_get_element(path, i), force_mapping);
122 // Edges are in odd positions.
123 for(uint i = 1; i < path_len; i += 2)
124 _AST_MapReferencedEdge(ast, cypher_ast_pattern_path_get_element(path, i), force_mapping);
125}
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) {

Callers 4

_AST_MapExpressionFunction · 0.85

Calls 2

_AST_MapReferencedNodeFunction · 0.85
_AST_MapReferencedEdgeFunction · 0.85

Tested by

no test coverage detected