Skip to content

Commit 42e8b7b

Browse files
Cleanup redundant asciidoc formatting from clauses examples (#583)
1 parent c7b589c commit 42e8b7b

21 files changed

+1087
-1098
lines changed

modules/ROOT/pages/clauses/clause_composition.adoc

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -85,28 +85,28 @@ The query only has read clauses, so the state of the graph remains unchanged and
8585
MATCH (john:Person {name: 'John'})
8686
----
8787
|
88-
[options="header",cols="1"]
88+
[options="header",cols="1m"]
8989
!===
9090
! john
91-
! ({name: 'John'})
91+
! (:Person {name: 'John'})
9292
!===
9393
9494
| ----
9595
MATCH (john)-[:FRIEND]->(friend)
9696
----
9797
|
98-
[options="header",cols="1, 1"]
98+
[options="header",cols="1m, 1m"]
9999
!===
100100
! john ! friend
101-
! ({name: 'John'}) ! ({name: 'Sara'})
102-
! ({name: 'John'}) ! ({name: 'Joe'})
101+
! (:Person {name: 'John'}) ! (:Person {name: 'Sara'})
102+
! (:Person {name: 'John'}) ! (:Person {name: 'Joe'})
103103
!===
104104
105105
| ----
106106
RETURN friend.name AS friendName
107107
----
108108
|
109-
[options="header",cols="1"]
109+
[options="header",cols="1m"]
110110
!===
111111
! friendName
112112
! 'Sara'
@@ -157,11 +157,11 @@ and for each such node it creates another node with the `name` property set to
157157
MATCH (j:Person) WHERE j.name STARTS WITH "J"
158158
----
159159
|
160-
[options="header",cols="1"]
160+
[options="header",cols="1m"]
161161
!===
162162
! j
163-
! ({name: 'John'})
164-
! ({name: 'Joe'})
163+
! (:Person {name: 'John'})
164+
! (:Person {name: 'Joe'})
165165
!===
166166
|
167167
[graphviz]
@@ -215,11 +215,11 @@ label = "{Person\|name = \'Maria\'\l}"
215215
CREATE (j)-[:FRIEND]->(jj:Person {name: "Jay-jay"})
216216
----
217217
|
218-
[options="header",cols="1, 1"]
218+
[options="header",cols="1m, 1m"]
219219
!===
220220
! j ! jj
221-
! ({name: 'John'}) ! ({name: 'Jay-jay'})
222-
! ({name: 'Joe'}) ! ({name: 'Jay-jay'})
221+
! (:Person {name: 'John'}) ! (:Person {name: 'Jay-jay'})
222+
! (:Person {name: 'Joe'}) ! (:Person {name: 'Jay-jay'})
223223
!===
224224
|
225225
@@ -327,10 +327,10 @@ RETURN count(*) AS count
327327
CREATE (jj:Person {name: "Jay-jay"})
328328
----
329329
|
330-
[options="header",cols="1"]
330+
[options="header",cols="1m"]
331331
!===
332332
! jj
333-
! ({name: 'Jay-jay'})
333+
! (:Person {name: 'Jay-jay'})
334334
!===
335335
|
336336
@@ -383,7 +383,7 @@ label = "{Person\|name = \'Jay-jay\'\l}"
383383
RETURN count(*) AS count
384384
----
385385
|
386-
[options="header",cols="1"]
386+
[options="header",cols="1m"]
387387
!===
388388
! count
389389
! 1
@@ -437,12 +437,12 @@ label = "{Person\|name = \'Jay-jay\'\l}"
437437
MATCH (j:Person) WHERE j.name STARTS WITH "J"
438438
----
439439
|
440-
[options="header",cols="1"]
440+
[options="header",cols="1m"]
441441
!===
442442
! j
443-
! ({name: 'John'})
444-
! ({name: 'Joe'})
445-
! ({name: 'Jay-jay'})
443+
! (:Person {name: 'John'})
444+
! (:Person {name: 'Joe'})
445+
! (:Person {name: 'Jay-jay'})
446446
!===
447447
|
448448
[graphviz]
@@ -498,7 +498,7 @@ label = "{Person\|name = \'Jay-jay\'\l}"
498498
RETURN count(*) AS count
499499
----
500500
|
501-
[options="header",cols="1"]
501+
[options="header",cols="1m"]
502502
!===
503503
! count
504504
! 3
@@ -566,11 +566,11 @@ The different invocations of the subquery are executed in turn, in the order of
566566

567567
Later invocations of the subquery can observe writes made by earlier invocations of the subquery.
568568

569-
.Table of intermediate results and state of the graph in a query qith `CALL {}`
569+
.Table of intermediate results and state of the graph in a query with `CALL {}`
570570
======
571571
Using the same example graph as above, this example shows the table of intermediate results and the state of the graph after each clause for the following query:
572572
573-
[source,cypher, indent=0]
573+
[source,cypher]
574574
----
575575
MATCH (john:Person {name: 'John'})
576576
SET john.friends = []
@@ -595,10 +595,10 @@ CALL {
595595
MATCH (john:Person {name: 'John'})
596596
----
597597
|
598-
[options="header",cols="1, 1"]
598+
[options="header",cols="1m"]
599599
!===
600600
! john
601-
! ({name: 'John'})
601+
! (:Person {name: 'John'})
602602
!===
603603
|
604604
[graphviz]
@@ -654,10 +654,10 @@ label = "{Person\|name = \'Maria\'\l}"
654654
SET john.friends = []
655655
----
656656
|
657-
[options="header",cols="1, 1"]
657+
[options="header",cols="1m"]
658658
!===
659659
! john
660-
! ({name: 'John', friends: []})
660+
! (:Person {name: 'John', friends: []})
661661
!===
662662
|
663663
[graphviz]
@@ -702,11 +702,11 @@ label = "{Person\|name = \'Maria\'\l}"
702702
MATCH (john)-[:FRIEND]->(friend)
703703
----
704704
|
705-
[options="header",cols="1, 1"]
705+
[options="header",cols="1m, 1m"]
706706
!===
707707
! john ! friend
708-
! ({name: 'John', friends: []}) ! ({name: 'Sara'})
709-
! ({name: 'John', friends: []}) ! ({name: 'Joe'})
708+
! (:Person {name: 'John', friends: []}) ! (:Person {name: 'Sara'})
709+
! (:Person {name: 'John', friends: []}) ! (:Person {name: 'Joe'})
710710
!===
711711
|
712712
[graphviz]
@@ -757,10 +757,10 @@ label = "{Person\|name = \'Maria\'\l}"
757757
WITH *, john.friends AS friends
758758
----
759759
|
760-
[options="header",cols="2, 1, 1"]
760+
[options="header",cols="2m, 1m, 1m"]
761761
!===
762762
! john ! friend ! friends
763-
! ({name: 'John', friends: []}) ! ({name: 'Sara'}) ! []
763+
! (:Person {name: 'John', friends: []}) ! (:Person {name: 'Sara'}) ! []
764764
!===
765765
|
766766
[graphviz]
@@ -803,10 +803,10 @@ label = "{Person\|name = \'Maria\'\l}"
803803
SET john.friends = friends + friend.name
804804
----
805805
806-
|[options="header",cols="2, 1, 1"]
806+
|[options="header",cols="2m, 1m, 1m"]
807807
!===
808808
! john ! friend ! friends
809-
! ({name: 'John', friends: ['Sara']}) ! ({name: 'Sara'}) ! []
809+
! (:Person {name: 'John', friends: ['Sara']}) ! (:Person {name: 'Sara'}) ! []
810810
!===
811811
|
812812
[graphviz]
@@ -851,10 +851,10 @@ label = "{Person\|name = \'Maria\'\l}"
851851
WITH *, john.friends AS friends
852852
----
853853
|
854-
[options="header",cols="2, 1, 1"]
854+
[options="header",cols="2m, 1m, 1m"]
855855
!===
856856
! john ! friend ! friends
857-
! ({name: 'John', friends: ['Sara']}) ! ({name: 'Joe'}) ! ['Sara']
857+
! (:Person {name: 'John', friends: ['Sara']}) ! (:Person {name: 'Joe'}) ! ['Sara']
858858
!===
859859
|
860860
[graphviz]
@@ -897,10 +897,10 @@ label = "{Person\|name = \'Maria\'\l}"
897897
SET john.friends = friends + friend.name
898898
----
899899
900-
|[options="header",cols="2, 1, 1"]
900+
|[options="header",cols="2m, 1m, 1m"]
901901
!===
902902
! john ! friend ! friends
903-
! ({name: 'John', friends: ['Sara', 'Joe']}) ! ({name: 'Joe'}) ! ['Sara']
903+
! (:Person {name: 'John', friends: ['Sara', 'Joe']}) ! (:Person {name: 'Joe'}) ! ['Sara']
904904
!===
905905
|
906906
[graphviz]
@@ -958,4 +958,4 @@ This is called xref::execution-plans/index.adoc#eagerness-laziness[lazy evaluati
958958
It only materializes intermediate results when needed.
959959
In many read-write queries it is unproblematic to execute clauses interleaved, but when it is not,
960960
Cypher must ensure that the table of intermediate results gets materialized at the right time(s).
961-
This is done by inserting an xref::execution-plans/operators.adoc#query-plan-eager[`Eager`] operator into the execution plan.
961+
This is done by inserting an xref::execution-plans/operators.adoc#query-plan-eager[`Eager`] operator into the execution plan.

modules/ROOT/pages/clauses/foreach.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ FOREACH (n IN nodes(p) | SET n.marked = true)
5151
.Result
5252
[role="queryresult",options="footer",cols="1*<m"]
5353
|===
54-
1+|(empty result)
55-
1+d|Rows: 0 +
54+
|(empty result)
55+
d|Rows: 0 +
5656
Properties set: 4
5757
|===
5858

modules/ROOT/pages/clauses/index.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ m| xref:clauses/listing-settings.adoc[SHOW SETTINGS]
5454
m| xref::clauses/load-csv.adoc[LOAD CSV]
5555
| Use when importing data from CSV files.
5656

57-
m| xref::clauses/call-subquery.adoc#subquery-call-in-transactions[`+CALL { ... } IN TRANSACTIONS+`]
57+
m| xref::clauses/call-subquery.adoc#subquery-call-in-transactions[CALL { ... } IN TRANSACTIONS]
5858
| This clause may be used to prevent an out-of-memory error from occurring when importing large amounts of data using `LOAD CSV`.
5959

6060
|===
@@ -99,13 +99,13 @@ The returned expressions may all be aliased using `AS`.
9999
|===
100100
| Clause | Description
101101

102-
m| xref::clauses/return.adoc[+RETURN ... [AS]+]
102+
m| xref::clauses/return.adoc[RETURN ... [AS]]
103103
| Defines what to include in the query result set.
104104

105-
m| xref::clauses/with.adoc[+WITH ... [AS]+]
105+
m| xref::clauses/with.adoc[WITH ... [AS]]
106106
| Allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next.
107107

108-
m| xref::clauses/unwind.adoc[+UNWIND ... [AS]+]
108+
m| xref::clauses/unwind.adoc[UNWIND ... [AS]]
109109
| Expands a list into a sequence of rows.
110110

111111
|===
@@ -169,7 +169,7 @@ These comprise sub-clauses that must operate as part of reading clauses.
169169
m| xref::clauses/where.adoc[WHERE]
170170
| Adds constraints to the patterns in a `MATCH` or `OPTIONAL MATCH` clause or filters the results of a `WITH` clause.
171171

172-
m| xref::clauses/order-by.adoc[+ORDER BY [ASC[ENDING] \| DESC[ENDING]]+]
172+
m| xref::clauses/order-by.adoc[ORDER BY [ASC[ENDING\] \| DESC[ENDING\]\]]
173173
| A sub-clause following `RETURN` or `WITH`, specifying that the output should be sorted in either ascending (the default) or descending order.
174174

175175
m| xref::clauses/skip.adoc[SKIP]
@@ -199,7 +199,7 @@ m| --- xref::clauses/merge.adoc#query-merge-on-create-on-match[ON CREATE]
199199
m| --- xref::clauses/merge.adoc#query-merge-on-create-on-match[ON MATCH]
200200
| Used in conjunction with `MERGE`, this write sub-clause specifies the actions to take if the pattern already exists.
201201

202-
m| xref::clauses/call.adoc[+CALL ... [YIELD ... ]+]
202+
m| xref::clauses/call.adoc[CALL ... [YIELD ... ]]
203203
| Invokes a procedure deployed in the database and return any results.
204204

205205
|===
@@ -232,10 +232,10 @@ Duplicates are retained.
232232
|===
233233
|Clause |Description
234234

235-
m| xref::clauses/call-subquery.adoc[+CALL { ... }+]
235+
m| xref::clauses/call-subquery.adoc[CALL { ... }]
236236
| Evaluates a subquery, typically used for post-union processing or aggregations.
237237

238-
m| xref::clauses/call-subquery.adoc#subquery-call-in-transactions[+CALL { ... } IN TRANSACTIONS+]
238+
m| xref::clauses/call-subquery.adoc#subquery-call-in-transactions[CALL { ... } IN TRANSACTIONS]
239239
a|
240240
Evaluates a subquery in separate transactions.
241241
Typically used when modifying or importing large amounts of data.

modules/ROOT/pages/clauses/limit.adoc

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ Limit to 3 rows by the example query.
4848
.Result
4949
[role="queryresult",options="header,footer",cols="1*<m"]
5050
|===
51-
| +n.name+
52-
| +"A"+
53-
| +"B"+
54-
| +"C"+
55-
1+d|Rows: 3
51+
| n.name
52+
| "A"
53+
| "B"
54+
| "C"
55+
d|Rows: 3
5656
|===
5757

5858

@@ -76,11 +76,11 @@ So randomly limit to 1, 2, or 3 rows.
7676
.Result
7777
[role="queryresult",options="header,footer",cols="1*<m"]
7878
|===
79-
| +n.name+
80-
| +"A"+
81-
| +"B"+
82-
| +"C"+
83-
1+d|Rows: 3
79+
| n.name
80+
| "A"
81+
| "B"
82+
| "C"
83+
d|Rows: 3
8484
|===
8585

8686

@@ -103,8 +103,8 @@ This query returns nothing, but creates one node:
103103
.Result
104104
[role="queryresult",options="footer",cols="1*<m"]
105105
|===
106-
1+|(empty result)
107-
1+d|Rows: 0 +
106+
|(empty result)
107+
d|Rows: 0 +
108108
Nodes created: 1
109109
|===
110110

@@ -122,8 +122,8 @@ This query returns nothing, but writes one property:
122122
.Result
123123
[role="queryresult",options="footer",cols="1*<m"]
124124
|===
125-
1+|(empty result)
126-
1+d|Rows: 0 +
125+
|(empty result)
126+
d|Rows: 0 +
127127
Properties set: 1
128128
|===
129129

@@ -143,9 +143,8 @@ Writes `locked` property on one node and return that node:
143143
.Result
144144
[role="queryresult",options="header,footer",cols="1*<m"]
145145
|===
146-
| +n+
147-
| +{locked:true,name:"A",age:60}+
148-
1+d|Rows: 1 +
146+
| n
147+
| {locked:true,name:"A",age:60}
148+
d|Rows: 1 +
149149
Properties set: 1
150150
|===
151-

0 commit comments

Comments
 (0)