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

Function Graph_ReserveNode

src/graph/graph.c:664–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664Node Graph_ReserveNode
665(
666 Graph *g // graph for which nodes will be added
667) {
668 ASSERT(g != NULL);
669
670 // reserve node ID
671 NodeID id = DataBlock_GetReservedIdx(g->nodes, g->reserved_node_count);
672
673 // increment reserved node count
674 g->reserved_node_count++;
675
676 // create node
677 Node n = (Node) { .attributes = NULL, .id = id };
678
679 return n;
680}
681
682void Graph_CreateNode
683(

Callers 2

_CreateNodesFunction · 0.85
_CreateEntitiesFunction · 0.85

Calls 1

DataBlock_GetReservedIdxFunction · 0.85

Tested by

no test coverage detected