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

Function ApplyDeleteNode

src/effects/effects_apply.c:409–432  ·  view source on GitHub ↗

process DeleteNode effect

Source from the content-addressed store, hash-verified

407
408// process DeleteNode effect
409static void ApplyDeleteNode
410(
411 FILE *stream, // effects stream
412 GraphContext *gc // graph to operate on
413) {
414 //--------------------------------------------------------------------------
415 // effect format:
416 // node ID
417 //--------------------------------------------------------------------------
418
419 Node n; // node to delete
420 EntityID id; // node ID
421 Graph *g = gc->g; // graph to delete node from
422
423 // read node ID off of stream
424 fread_assert(&id, sizeof(EntityID), stream);
425
426 // retrieve node from graph
427 int res = Graph_GetNode(g, id, &n);
428 ASSERT(res != 0);
429
430 // delete node
431 DeleteNodes(gc, &n, 1, false);
432}
433
434// process DeleteNode effect
435static void ApplyDeleteEdge

Callers 1

Effects_ApplyFunction · 0.85

Calls 2

Graph_GetNodeFunction · 0.85
DeleteNodesFunction · 0.85

Tested by

no test coverage detected