Parameters, Value
Path length function returns the length of the path, i.e. the number of edges in the path.
Syntax:
- Format: length(
<path>
) - Parameters: see table below
- Value: ATTR ( number )
Name | Category | Specification | Description |
---|---|---|---|
path | PATH | / | the path to be calculated |
Common Usage
Example: Find the shortest paths within 5 steps from card CA001 to CA002, and return the length of found paths
n({_id == "CA001"}).e()[*:5].n({_id == "CA002"}) as paths
limit 1
return length(paths)