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

Function SIPath_Relationships

src/datatypes/path/sipath.c:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42SIValue SIPath_Relationships(SIValue p) {
43 Path *path = (Path *) p.ptrval;
44 uint edgeCount = Path_EdgeCount(path);
45 SIValue array = SIArray_New(edgeCount);
46 for(uint i = 0; i < edgeCount; i++) {
47 SIArray_Append(&array, SI_Edge(Path_GetEdge(path, i)));
48 }
49 return array;
50}
51
52SIValue SIPath_GetRelationship(SIValue p, size_t i) {
53 ASSERT(i < SIPath_Length(p));

Callers 2

AR_PATH_RELATIONSHIPSFunction · 0.85

Calls 5

Path_EdgeCountFunction · 0.85
SIArray_NewFunction · 0.85
SIArray_AppendFunction · 0.85
SI_EdgeFunction · 0.85
Path_GetEdgeFunction · 0.85

Tested by

no test coverage detected