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

Function UpdateFree

src/execution_plan/ops/op_update.c:143–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static void UpdateFree(OpBase *ctx) {
144 OpUpdate *op = (OpUpdate *)ctx;
145
146 if(op->node_updates) {
147 HashTableRelease(op->node_updates);
148 op->node_updates = NULL;
149 }
150
151 if(op->edge_updates) {
152 HashTableRelease(op->edge_updates);
153 op->edge_updates = NULL;
154 }
155
156 // free each update context
157 if(op->update_ctxs) {
158 raxFreeWithCallback(op->update_ctxs, (void(*)(void *))UpdateCtx_Free);
159 op->update_ctxs = NULL;
160 }
161
162 if(op->records) {
163 uint records_count = array_len(op->records);
164 for(uint i = 0; i < records_count; i++) OpBase_DeleteRecord(op->records[i]);
165 array_free(op->records);
166 op->records = NULL;
167 }
168
169 raxStop(&op->it);
170}

Callers

nothing calls this directly

Calls 4

HashTableReleaseFunction · 0.85
array_lenFunction · 0.85
OpBase_DeleteRecordFunction · 0.85
array_freeFunction · 0.85

Tested by

no test coverage detected