You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/clauses/limit.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,14 +166,14 @@ Properties set: 1
166
166
`LIMIT` can be used as a standalone clause, or in conjunction with xref:clauses/order-by.adoc[`ORDER BY`] or xref:clauses/skip.adoc[`SKIP`]/xref:clauses/skip.adoc#offset-synonym[`OFFSET`].
The below query uses a xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause] (introduced in Neo4j 5.23) to import variables into the `CALL` subquery.
707
+
The query below uses a xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause] (introduced in Neo4j 5.23) to import variables into the `CALL` subquery.
704
708
If you are using an older version of Neo4j, use an xref:subqueries/call-subquery.adoc#importing-with[importing `WITH` clause] instead.
705
709
706
710
.Query
711
+
// tag::clauses_load_csv_transactions[]
707
712
[source, cypher]
708
713
----
709
714
LOAD CSV WITH HEADERS FROM 'https://data.neo4j.com/importing-cypher/persons.csv' AS row
@@ -712,6 +717,7 @@ CALL (row) {
712
717
SET p.name = row.name, p.born = row.born
713
718
} IN TRANSACTIONS OF 200 ROWS
714
719
----
720
+
// end::clauses_load_csv_transactions[]
715
721
716
722
.Result
717
723
[source, role="queryresult"]
@@ -746,11 +752,13 @@ A common use case for this function is to generate sequential unique IDs for CSV
Copy file name to clipboardExpand all lines: modules/ROOT/pages/clauses/unwind.adoc
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,13 @@ The `UNWIND` clause requires you to specify a new name for the inner values.
29
29
We want to transform the literal list into rows named `x` and return them.
30
30
31
31
.Query
32
-
tag::clauses_unwind_list[]
32
+
// tag::clauses_unwind_list[]
33
33
[source, cypher]
34
34
----
35
35
UNWIND [1, 2, 3, null] AS x
36
36
RETURN x, 'val' AS y
37
37
----
38
-
end::clauses_unwind_list[]
38
+
// end::clauses_unwind_list[]
39
39
40
40
Each value of the original list -- including `null` -- is returned as an individual row.
41
41
@@ -111,15 +111,15 @@ The two lists -- _a_ and _b_ -- are concatenated to form a new list, which is th
111
111
Multiple `UNWIND` clauses can be chained to unwind nested list elements.
112
112
113
113
.Query
114
-
tag::clauses_unwind_nested_list[]
114
+
// tag::clauses_unwind_nested_list[]
115
115
[source, cypher]
116
116
----
117
117
WITH [[1, 2], [3, 4], 5] AS nested
118
118
UNWIND nested AS x
119
119
UNWIND x AS y
120
120
RETURN y
121
121
----
122
-
end::clauses_unwind_nested_list[]
122
+
// end::clauses_unwind_nested_list[]
123
123
124
124
The first `UNWIND` results in three rows for `x`, each of which contains an element of the original list (two of which are also lists); namely, `[1, 2]`, `[3, 4]`, and `5`.
125
125
The second `UNWIND` then operates on each of these rows in turn, resulting in five rows for `y`.
@@ -216,15 +216,15 @@ Create a number of nodes and relationships from a parameter-list without using `
216
216
----
217
217
218
218
.Query
219
-
tag::clauses_unwind_create_nodes[]
219
+
// tag::clauses_unwind_create_nodes[]
220
220
[source, cypher]
221
221
----
222
222
UNWIND $events AS event
223
223
MERGE (y:Year {year: event.year})
224
224
MERGE (y)<-[:IN]-(e:Event {id: event.id})
225
225
RETURN e.id AS x ORDER BY x
226
226
----
227
-
end::clauses_unwind_create_nodes[]
227
+
// end::clauses_unwind_create_nodes[]
228
228
229
229
Each value of the original list is unwound and passed through `MERGE` to find or create the nodes and relationships.
0 commit comments