Skip to content

Commit 22221f3

Browse files
Ignitionmatea16
andauthored
Update for pattern comprehensions (#1504)
- nested - named path Co-authored-by: Matea Pesic <80577904+matea16@users.noreply.github.com>
1 parent 9bf2b4b commit 22221f3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pages/querying/expressions.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ RETURN actor.name, years, titles;
243243
```
244244
The whole predicate, including the `WHERE` keyword, is optional and may be omitted.
245245

246+
Pattern comprehensions can be nested, for example `[(n)-->(m) | [(m)-->(x) | x.id]]` returns a list of lists.
247+
248+
You can also bind the matched path to a variable using the syntax `[path = (a)-[r]->(b) | length(path)]`.
249+
246250
### Pattern comprehension in `WHERE` clause
247251

248252
Pattern comprehension can also be combined with comprehension constructs inside the `WHERE` clause.

0 commit comments

Comments
 (0)