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

Function SIPath_Nodes

src/datatypes/path/sipath.c:58–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58SIValue SIPath_Nodes(SIValue p) {
59 Path *path = (Path *) p.ptrval;
60 uint nodeCount = Path_NodeCount(path);
61 SIValue array = SIArray_New(nodeCount);
62 for(uint i = 0; i < nodeCount; i++) {
63 SIArray_Append(&array, SI_Node(Path_GetNode(path, i)));
64 }
65 return array;
66}
67
68SIValue SIPath_GetNode(SIValue p, size_t i) {
69 ASSERT(i < SIPath_NodeCount(p));

Callers 2

AR_PATH_NODESFunction · 0.85

Calls 5

Path_NodeCountFunction · 0.85
SIArray_NewFunction · 0.85
SIArray_AppendFunction · 0.85
SI_NodeFunction · 0.85
Path_GetNodeFunction · 0.85

Tested by

no test coverage detected