Recursive relationship functions
Function | Description |
---|---|
NODES | returns all nodes from a recursive relationship |
RELS | returns all rels from a recursive relationship |
PROPERTIES | return given property from nodes/relationships |
IS_TRAIL | check if path contains repeated relationships |
IS_ACYCLIC | check if path contains repeated nodes |
LENGTH | returns the number of relationships (path length) in a recursive relationship |
NODES
Returns all nodes from path.
Input type | Output type |
---|---|
RECURSIVE_REL | LIST[NODE] |
Output:
RELS
Returns all relationships from a recursive relationship.
Input type | Output type |
---|---|
RECURSIVE_REL | LIST[REL] |
Output:
PROPERTIES
Return given property from nodes/relationships.
Input type | Output type |
---|---|
LIST[NODE/REL] , STRING | LIST[ANY] |
Output:
IS_TRAIL
Check if a recursive relationship contains repeated relationships.
Input type | Output type |
---|---|
RECURSIVE_REL | BOOLEAN |
Output
IS_ACYCLIC
Check if a recursive relationship contains repeated nodes.
Input type | Output type |
---|---|
RECURSIVE_REL | BOOLEAN |
Output:
LENGTH
Return the number of relationships (path length) in a recursive relationship.
The LENGTH
function when applied to a recursive relationship is shorthand for SIZE(rels(p))
,
which also returns the same result.