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

Function _OpBase_PropagateReset

src/execution_plan/ops/op.c:155–173  ·  view source on GitHub ↗

collects writing operations under `op` into `write_ops`, and resets the reading ops (including `op` itself)

Source from the content-addressed store, hash-verified

153// collects writing operations under `op` into `write_ops`, and resets the
154// reading ops (including `op` itself)
155static void _OpBase_PropagateReset
156(
157 OpBase *op,
158 OpBase ***write_ops
159) {
160 if(op->reset) {
161 if(OpBase_IsWriter(op)) {
162 array_append(*write_ops, op);
163 } else {
164 OpResult res = op->reset(op);
165 ASSERT(res == OP_OK);
166 }
167 }
168
169 // recursively reset children
170 for(int i = 0; i < op->childCount; i++) {
171 _OpBase_PropagateReset(op->children[i], write_ops);
172 }
173}
174
175void OpBase_PropagateReset
176(

Callers 1

OpBase_PropagateResetFunction · 0.85

Calls 1

OpBase_IsWriterFunction · 0.85

Tested by

no test coverage detected