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

Function _Validate_identifier

src/ast/ast_validations.c:463–481  ·  view source on GitHub ↗

validate that an identifier is bound

Source from the content-addressed store, hash-verified

461
462// validate that an identifier is bound
463static VISITOR_STRATEGY _Validate_identifier
464(
465 const cypher_astnode_t *n, // ast-node (identifier)
466 bool start, // first traversal
467 ast_visitor *visitor // visitor
468) {
469 validations_ctx *vctx = AST_Visitor_GetContext(visitor);
470
471 if(!start || vctx->ignore_identifiers) {
472 return VISITOR_CONTINUE;
473 }
474
475 const char *identifier = cypher_ast_identifier_get_name(n);
476 if(_Validate_referred_identifier(vctx->defined_identifiers, identifier) == AST_INVALID) {
477 return VISITOR_BREAK;
478 }
479
480 return VISITOR_RECURSE;
481}
482
483// validate the values of a map
484static VISITOR_STRATEGY _Validate_map

Callers

nothing calls this directly

Calls 2

AST_Visitor_GetContextFunction · 0.85

Tested by

no test coverage detected