Skip to content

Commit 10f9431

Browse files
authored
removed a cypher-25 note from clause composition content in cypher-5 (#1335)
1 parent 6dc8317 commit 10f9431

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

modules/ROOT/pages/clauses/clause-composition.adoc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,6 @@ The most important aspect of read-write queries is that the state of the graph a
133133
A clause can never observe writes made by a later clause, and will observe all writes done by the previous clauses.
134134
====
135135

136-
As of Cypher 25, read and write clauses can be combined in any order.
137-
That is, a write clause followed by a read clause no longer requires a separating xref:clauses/with.adoc[`WITH`] clause in order for the read clause to observe the changes made by a preceding write clause.
138-
For example, the following query, in which the changes made by a write clause (xref:clauses/set.adoc[`SET`]) are observed by a subsequent `MATCH` clause without an intermediate `WITH` clause, is valid using Cypher 25 but not link:https://neo4j.com/docs/cypher-manual/current/clauses/with/#combine-write-and-read-clauses[Cypher 5].
139-
140-
141-
.Combine write and read clauses without a separating `WITH` clause
142-
[source, cypher]
143-
----
144-
MATCH (j:Person {name: 'John'})-[:FRIEND]->(f)
145-
SET f.degreesFromJohn = 1
146-
MATCH (f)-[:FRIEND]->(f2)
147-
SET f2.degreesFromJohn = f.degreesFromJohn + 1
148-
RETURN f.name AS friendName,
149-
f.degreesFromJohn AS friendDegree,
150-
f2.name AS friendOfFriendName,
151-
f2.degreesFromJohn AS friendOfFriendDegree
152-
----
153-
154136
.Table of intermediate results and state of the graph between read and write clauses
155137
======
156138

0 commit comments

Comments
 (0)