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

Function AST_CollectAliases

src/ast/ast.c:379–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void AST_CollectAliases
380(
381 const char ***aliases,
382 const cypher_astnode_t *entity
383) {
384 if(entity == NULL) return;
385
386 const cypher_astnode_t **identifier_nodes = AST_GetTypedNodes(entity, CYPHER_AST_IDENTIFIER);
387 uint nodes_count = array_len(identifier_nodes);
388 for(uint i = 0 ; i < nodes_count; i ++) {
389 const char *identifier = cypher_ast_identifier_get_name(identifier_nodes[i]);
390 array_append(*aliases, identifier);
391 }
392
393 array_free(identifier_nodes);
394}
395
396AST *AST_Build
397(

Callers 1

_convertPatternPathFunction · 0.85

Calls 3

AST_GetTypedNodesFunction · 0.85
array_lenFunction · 0.85
array_freeFunction · 0.85

Tested by

no test coverage detected