Hello,
I've been trying to find some documentation for the pipe operator (|) when used with list operations in Cypher, but I couldn't find anything. This documentation on the FOREACH
clause also uses |
in the query, but again, there's no reference to what it does -
MATCH p =(begin)-[*]->(END )
WHERE begin.name = 'A' AND END .name = 'D'
FOREACH (n IN nodes(p)| SET n.marked = TRUE )
I know what the query does here, but what is the purpose of the |
?
A similar query I created while playing with the Movies
graph -
MATCH path=(p:Person)-[:ACTED_IN]->(m:Movie)
RETURN [n in nodes(path) | labels(n)[0]]
This returns -
My rough guess is that the |
behaves like "for this, do that", but this is just my guess. Is there some other documentation that explains |
?