Skip to content

Commit

Permalink
Add example with empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
Mats-SX committed May 15, 2017
1 parent fdf3265 commit 041a64a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cip/2.testable/CIP2017-04-24-UNWIND.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= CIP2016-12-19-UNWIND
= CIP2016-12-19 UNWIND
:numbered:
:toc:
:toc-placement: macro
Expand Down Expand Up @@ -70,3 +70,14 @@ RETURN one, two, element
----

The above query will return a single record with the field/value pairs `one: 1`, `two: 2`, `element: 1`.

.Unwinding an empty list
[source, cypher]
----
WITH [[], [1, 2, 3]] AS lists
UNWIND lists AS list
UNWIND list AS element
RETURN element
----

The above query will return an empty result set, as the empty list will zero out cardinality.

0 comments on commit 041a64a

Please sign in to comment.