Skip to content

Commit a532b28

Browse files
fix queries
1 parent 9aefb60 commit a532b28

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

modules/ROOT/pages/clauses/use.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ In subqueries, a `USE` clause may appear directly following the xref:subqueries/
7373
[source, cypher, role=test-setup]
7474
----
7575
CREATE DATABASE myDatabase;
76-
CREATE COMPOSITE DATABASE `myComposite`;
77-
CREATE ALIAS `myComposite`.`myConstituent` FOR DATABASE `myDatabase`;
76+
CREATE COMPOSITE DATABASE myComposite;
77+
CREATE ALIAS myComposite.myConstituent FOR DATABASE myDatabase;
7878
----
7979
////
8080

@@ -117,7 +117,7 @@ This example uses a composite database named `myComposite` that includes an alia
117117
.Query
118118
[source, cypher]
119119
----
120-
USE graph.byName('myComposite.myConstituent')
120+
USE graph.byName(myComposite.myConstituent)
121121
MATCH (n) RETURN n
122122
----
123123

modules/ROOT/pages/patterns/match-modes.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,10 @@ The next example matches paths starting and ending at the same `Location` (`Knei
181181
----
182182
MATCH REPEATABLE ELEMENTS p = (start:Location {name: 'Kneiphof'})-[:BRIDGE]-{,9}(start) // <1>
183183
WHERE all(bridge IN range(1,7) WHERE bridge IN [r IN relationships(p) | r.id]) // <2>
184-
WITH p
185-
ORDER BY length(p)
186-
LIMIT 1
187184
RETURN [n IN nodes(p) | n.name] AS visitedLocations,
188185
[r IN relationships(p) | r.id] AS crossedBridges
186+
ORDER BY length(p), crossedBridges
187+
LIMIT 1
189188
----
190189

191190
<1> Paths with a length of less than 9 relationships return no results because they do not allow enough moves to traverse all seven bridges at least once while forming a cycle back to Kneiphof.
@@ -196,13 +195,13 @@ RETURN [n IN nodes(p) | n.name] AS visitedLocations,
196195
|===
197196
| visitedLocations | crossedBridges
198197

199-
| ["Kneiphof", "South Bank", "Kneiphof", "South Bank", "Lomse", "Kneiphof", "North Bank", "Lomse", "North Bank", "Kneiphof"]
200-
| [4, 6, 4, 3, 7, 5, 2, 2, 1]
198+
| ["Kneiphof", "North Bank", "Kneiphof", "South Bank", "Lomse", "North Bank", "Kneiphof", "South Bank", "Lomse", "Kneiphof"]
199+
| [1, 1, 4, 3, 2, 5, 6, 3, 7]
201200

202201
2+d|Rows: 1
203202
|===
204203

205-
The order of the bridges traversed in the path returned demonstrates that bridges `2` and `4` were crossed twice in order to return to `Kneiphof`.
204+
The order of the bridges traversed in the path returned demonstrates that bridges `1` and `3` were crossed twice in order to return to `Kneiphof`.
206205

207206
image::repeatable-elements-graph.svg[Several graphs showing order of traversals when using repeatable elements match mode, width=600, role=popup]
208207
_Sequence of bridge traversals when using `REPEATABLE ELEMENTS`._

modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ CREATE (techCorp:Supplier {name: 'TechCorp', email: '[email protected]'}),
6565
== Syntax
6666

6767
.`NEXT` syntax
68-
[source, cypher]
68+
[source, syntax]
6969
----
7070
<Query1>
7171

0 commit comments

Comments
 (0)