Example Graph
The following examples run against this graph:

length()
Returns the number of edges in a path.
| Syntax | length(<pathAlias>) |
||
| Arguments | Name | Type | Description |
<pathAlias> |
PATH |
Path alias reference | |
| Return Type | UINT |
||
n().re()[1:3].n() as p
return p{*}, length(p) as length
Result:
| p | length |
|---|---|
![]() |
2 |
![]() |
1 |
![]() |
1 |
pedges()
Collects edges in a path into a list.
| Syntax | pedges(<pathAlias>) |
||
| Arguments | Name | Type | Description |
<pathAlias> |
PATH |
Path alias reference | |
| Return Type | LIST |
||
n({_id == "P1"}).re()[1:2].n() as p
return pedges(p)
Result:
| pedges(p) |
|---|
| [{"from":"P1","to":"P2","uuid":"1","from_uuid":"10448353334522806273","to_uuid":"3098478742654156802","schema":"Cites","values":{}}] |
| [{"from":"P1","to":"P2","uuid":"1","from_uuid":"10448353334522806273","to_uuid":"3098478742654156802","schema":"Cites","values":{}},{"from":"P2","to":"P3","uuid":"2","from_uuid":"3098478742654156802","to_uuid":"13618887472191635459","schema":"Cites","values":{}}] |
pedgeUuids()
Collects the _uuid values of edges in a path into a list.
| Syntax | pedgeUuids(<pathAlias>) |
||
| Arguments | Name | Type | Description |
<pathAlias> |
PATH |
Path alias reference | |
| Return Type | LIST |
||
n({_id == "P1"}).re()[1:2].n() as p
return pedgeUuids(p)
Result:
| pedgeUuids(p) |
|---|
| ["1"] |
| ["1","2"] |
pnodes()
Collects nodes in a path into a list.
| Syntax | pnodes(<pathAlias>) |
||
| Arguments | Name | Type | Description |
<pathAlias> |
PATH |
Path alias reference | |
| Return Type | LIST |
||
n({_id == "P1"}).re()[1:2].n() as p
return pnodes(p)
Result:
| pnodes(p) |
|---|
| [{"id":"P1","uuid":"10448353334522806273","schema":"Paper","values":{}},{"id":"P2","uuid":"3098478742654156802","schema":"Paper","values":{}}] |
| [{"id":"P1","uuid":"10448353334522806273","schema":"Paper","values":{}},{"id":"P2","uuid":"3098478742654156802","schema":"Paper","values":{}},{"id":"P3","uuid":"13618887472191635459","schema":"Paper","values":{}}] |
pnodeIds()
Collects the _id values of nodes in a path into a list.
| Syntax | pnodeIds(<pathAlias>) |
||
| Arguments | Name | Type | Description |
<pathAlias> |
PATH |
Path alias reference | |
| Return Type | LIST |
||
n({_id == "P1"}).re()[1:2].n() as p
return pnodeIds(p)
Result:
| pnodeIds(p) |
|---|
| ["P1","P2"] |
| ["P1","P2","P3"] |


