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

Function _AR_EXP_UpdateEntityIdx

src/arithmetic/arithmetic_expression.c:517–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517static bool _AR_EXP_UpdateEntityIdx(AR_OperandNode *node, const Record r) {
518 if(!r) {
519 // Set the query-level error.
520 ErrorCtx_SetError("_AR_EXP_UpdateEntityIdx: No record was given to locate a value with alias %s",
521 node->variadic.entity_alias);
522 return false;
523 }
524 int entry_alias_idx = Record_GetEntryIdx(r, node->variadic.entity_alias);
525 if(entry_alias_idx == INVALID_INDEX) {
526 // Set the query-level error.
527 ErrorCtx_SetError("_AR_EXP_UpdateEntityIdx: Unable to locate a value with alias %s within the record",
528 node->variadic.entity_alias);
529 return false;
530 } else {
531 node->variadic.entity_alias_idx = entry_alias_idx;
532 return true;
533 }
534}
535
536static AR_EXP_Result _AR_EXP_EvaluateVariadic(AR_ExpNode *node, const Record r, SIValue *result) {
537 // Make sure entity record index is known.

Callers 1

_AR_EXP_EvaluateVariadicFunction · 0.85

Calls 2

ErrorCtx_SetErrorFunction · 0.85
Record_GetEntryIdxFunction · 0.85

Tested by

no test coverage detected