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

Function EffectsBuffer_AddEntityUpdateAttributeEffect

src/effects/effects.c:636–653  ·  view source on GitHub ↗

add an entity update attribute effect to buffer

Source from the content-addressed store, hash-verified

634
635// add an entity update attribute effect to buffer
636void EffectsBuffer_AddEntityUpdateAttributeEffect
637(
638 EffectsBuffer *buff, // effect buffer
639 GraphEntity *entity, // updated entity ID
640 Attribute_ID attr_id, // updated attribute ID
641 SIValue value, // value
642 GraphEntityType entity_type // entity type
643) {
644 ResultSetStatistics *stats = QueryCtx_GetResultSetStatistics();
645 stats->properties_set++; // attribute was set
646 stats->properties_removed++; // old attribute was deleted
647
648 if(entity_type == GETYPE_NODE) {
649 EffectsBuffer_AddNodeUpdateEffect(buff, (Node*)entity, attr_id, value);
650 } else {
651 EffectsBuffer_AddEdgeUpdateEffect(buff, (Edge*)entity, attr_id, value);
652 }
653}
654
655// add a node add label effect to buffer
656void EffectsBuffer_AddSetRemoveLabelsEffect

Callers 1

EvalEntityUpdatesFunction · 0.85

Tested by

no test coverage detected