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

Function _RdbSaveEdge

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

Source from the content-addressed store, hash-verified

91}
92
93static void _RdbSaveEdge
94(
95 RedisModuleIO *rdb,
96 const Graph *g,
97 const Edge *e,
98 int r
99) {
100
101 // Format:
102 // edge ID
103 // source node ID
104 // destination node ID
105 // relation type
106 // edge properties
107
108 RedisModule_SaveUnsigned(rdb, ENTITY_GET_ID(e));
109
110 // source node ID
111 RedisModule_SaveUnsigned(rdb, Edge_GetSrcNodeID(e));
112
113 // destination node ID
114 RedisModule_SaveUnsigned(rdb, Edge_GetDestNodeID(e));
115
116 // relation type
117 RedisModule_SaveUnsigned(rdb, r);
118
119 // edge properties
120 _RdbSaveEntity(rdb, (GraphEntity *)e);
121}
122
123static void _RdbSaveNode_v13
124(

Callers 2

_RdbSaveMultipleEdgesFunction · 0.85
RdbSaveEdges_v13Function · 0.85

Calls 3

Edge_GetSrcNodeIDFunction · 0.85
Edge_GetDestNodeIDFunction · 0.85
_RdbSaveEntityFunction · 0.85

Tested by

no test coverage detected