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

Function _RdbSaveEntity

src/serializers/encoder/v13/encode_graph_entities.c:71–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static void _RdbSaveEntity
72(
73 RedisModuleIO *rdb,
74 const GraphEntity *e
75) {
76 // Format:
77 // #attributes N
78 // (name, value type, value) X N
79
80 const AttributeSet set = GraphEntity_GetAttributes(e);
81 uint16_t attr_count = AttributeSet_Count(set);
82
83 RedisModule_SaveUnsigned(rdb, attr_count);
84
85 for(int i = 0; i < attr_count; i++) {
86 Attribute_ID attr_id;
87 SIValue value = AttributeSet_GetIdx(set, i, &attr_id);
88 RedisModule_SaveUnsigned(rdb, attr_id);
89 _RdbSaveSIValue(rdb, &value);
90 }
91}
92
93static void _RdbSaveEdge
94(

Callers 2

_RdbSaveEdgeFunction · 0.85
_RdbSaveNode_v13Function · 0.85

Calls 4

AttributeSet_CountFunction · 0.85
AttributeSet_GetIdxFunction · 0.85
_RdbSaveSIValueFunction · 0.85

Tested by

no test coverage detected