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

Function GraphEntity_Keys

src/graph/entities/graph_entity.c:48–63  ·  view source on GitHub ↗

returns an SIArray of all keys in graph entity properties

Source from the content-addressed store, hash-verified

46
47// returns an SIArray of all keys in graph entity properties
48SIValue GraphEntity_Keys
49(
50 const GraphEntity *e
51) {
52 GraphContext *gc = QueryCtx_GetGraphCtx();
53 const AttributeSet set = GraphEntity_GetAttributes(e);
54 int prop_count = AttributeSet_Count(set);
55 SIValue keys = SIArray_New(prop_count);
56 for(int i = 0; i < prop_count; i++) {
57 Attribute_ID attr_id;
58 AttributeSet_GetIdx(set, i, &attr_id);
59 const char *key = GraphContext_GetAttributeString(gc, attr_id);
60 SIArray_Append(&keys, SI_ConstStringVal(key));
61 }
62 return keys;
63}
64
65// returns a map containing all the properties in the given node, or edge.
66SIValue GraphEntity_Properties

Callers 1

AR_KEYSFunction · 0.85

Calls 8

QueryCtx_GetGraphCtxFunction · 0.85
AttributeSet_CountFunction · 0.85
SIArray_NewFunction · 0.85
AttributeSet_GetIdxFunction · 0.85
SIArray_AppendFunction · 0.85
SI_ConstStringValFunction · 0.85

Tested by

no test coverage detected