Skip to content

Commit d932269

Browse files
committed
tags for LIMIT and FOREACH
1 parent 943cf62 commit d932269

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/ROOT/pages/clauses/foreach.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ CREATE
3636
This query will set the property `marked` to `true` on all nodes along a path.
3737

3838
.Query
39+
tag::clauses_foreach[]
3940
[source, cypher, indent=0]
4041
----
4142
MATCH p=(start)-[*]->(finish)
4243
WHERE start.name = 'A' AND finish.name = 'D'
4344
FOREACH (n IN nodes(p) | SET n.marked = true)
4445
----
46+
end::clauses_foreach[]
4547

4648
.Result
4749
[role="queryresult",options="footer",cols="1*<m"]

modules/ROOT/pages/clauses/limit.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,14 @@ Properties set: 1
166166
`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`].
167167

168168
.Standalone use of `LIMIT`
169+
tag::clauses_limit_standalone[]
169170
[source, cypher]
170171
----
171172
MATCH (n)
172173
LIMIT 2
173174
RETURN collect(n.name) AS names
174175
----
176+
tag::clauses_limit_standalone[]
175177

176178
.Result
177179
[role="queryresult",options="header,footer",cols="1*<m"]
@@ -185,6 +187,7 @@ The following query orders all nodes by `name` descending, skips the two first r
185187
It then xref:functions/aggregating.adoc#functions-collect[collects] the results in a list.
186188

187189
.`LIMIT` used in conjunction with `ORDER BY` and `SKIP`
190+
tag::clauses_limit[]
188191
[source, cypher]
189192
----
190193
MATCH (n)
@@ -193,6 +196,7 @@ SKIP 2
193196
LIMIT 2
194197
RETURN collect(n.name) AS names
195198
----
199+
end::clauses_limit[]
196200

197201
.Result
198202
[role="queryresult",options="header,footer",cols="1*<m"]

0 commit comments

Comments
 (0)