diff --git a/modules/ROOT/pages/clauses/clause-composition.adoc b/modules/ROOT/pages/clauses/clause-composition.adoc index 06f3a8691..7595ea8d2 100644 --- a/modules/ROOT/pages/clauses/clause-composition.adoc +++ b/modules/ROOT/pages/clauses/clause-composition.adoc @@ -133,24 +133,6 @@ The most important aspect of read-write queries is that the state of the graph a A clause can never observe writes made by a later clause, and will observe all writes done by the previous clauses. ==== -As of Cypher 25, read and write clauses can be combined in any order. -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. -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]. - - -.Combine write and read clauses without a separating `WITH` clause -[source, cypher] ----- -MATCH (j:Person {name: 'John'})-[:FRIEND]->(f) -SET f.degreesFromJohn = 1 -MATCH (f)-[:FRIEND]->(f2) -SET f2.degreesFromJohn = f.degreesFromJohn + 1 -RETURN f.name AS friendName, - f.degreesFromJohn AS friendDegree, - f2.name AS friendOfFriendName, - f2.degreesFromJohn AS friendOfFriendDegree ----- - .Table of intermediate results and state of the graph between read and write clauses ======