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

Function GraphEntity_GetProperty

src/graph/entities/graph_entity.c:29–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29SIValue *GraphEntity_GetProperty
30(
31 const GraphEntity *e,
32 Attribute_ID attr_id
33) {
34 ASSERT(e);
35
36 // e->attributes is NULL when dealing with an "intermediate" entity,
37 // one which didn't had its attribute-set allocated within the graph datablock.
38 if(e->attributes == NULL) {
39 // note that this exception may cause memory to be leaked in the caller
40 ErrorCtx_SetError("Attempted to access undefined attribute");
41 return ATTRIBUTE_NOTFOUND;
42 }
43
44 return AttributeSet_Get(*e->attributes, attr_id);
45}
46
47// returns an SIArray of all keys in graph entity properties
48SIValue GraphEntity_Keys

Callers 8

Index_IndexGraphEntityFunction · 0.85
AR_PROPERTYFunction · 0.85
UpdateNodePropertyFunction · 0.85
UpdateEdgePropertyFunction · 0.85
_get_value_or_defualtFunction · 0.85
_get_value_or_defualtFunction · 0.85

Calls 2

ErrorCtx_SetErrorFunction · 0.85
AttributeSet_GetFunction · 0.85

Tested by

no test coverage detected