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

Function EffectsBuffer_AddEntityRemoveAttributeEffect

src/effects/effects.c:593–614  ·  view source on GitHub ↗

add an entity attribute removal effect to buffer

Source from the content-addressed store, hash-verified

591
592// add an entity attribute removal effect to buffer
593void EffectsBuffer_AddEntityRemoveAttributeEffect
594(
595 EffectsBuffer *buff, // effect buffer
596 GraphEntity *entity, // updated entity ID
597 Attribute_ID attr_id, // updated attribute ID
598 GraphEntityType entity_type // entity type
599) {
600 // attribute was deleted
601 int n = (attr_id == ATTRIBUTE_ID_ALL)
602 ? AttributeSet_Count(*entity->attributes)
603 : 1;
604
605 ResultSetStatistics *stats = QueryCtx_GetResultSetStatistics();
606 stats->properties_removed += n;
607
608 SIValue v = SI_NullVal();
609 if(entity_type == GETYPE_NODE) {
610 EffectsBuffer_AddNodeUpdateEffect(buff, (Node*)entity, attr_id, v);
611 } else {
612 EffectsBuffer_AddEdgeUpdateEffect(buff, (Edge*)entity, attr_id, v);
613 }
614}
615
616// add an entity add new attribute effect to buffer
617void EffectsBuffer_AddEntityAddAttributeEffect

Callers 1

EvalEntityUpdatesFunction · 0.85

Calls 5

AttributeSet_CountFunction · 0.85
SI_NullValFunction · 0.85

Tested by

no test coverage detected