Skip to content

Commit 6ba78a4

Browse files
Cypher 25 query fixes (#1293)
1 parent 42388d1 commit 6ba78a4

File tree

6 files changed

+22
-11
lines changed

6 files changed

+22
-11
lines changed

modules/ROOT/pages/clauses/filter.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Because `WHERE` is a subclause qualifying a described pattern, it can be used in
202202
----
203203
WITH 35 AS minAge
204204
MATCH (a:Person WHERE a.name = 'Andy')-[:KNOWS]->(b:Person WHERE b.age > minAge)
205-
RETURN b.name AS name`
205+
RETURN b.name AS name
206206
----
207207
.Result
208208
[role="queryresult",options="header,footer",cols="1*<m"]

modules/ROOT/pages/clauses/let.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ ORDER BY price
216216
| "Chocolate" | 5 | TRUE | 'Budget'
217217
| "Coffee" | 10 | TRUE | 'Budget'
218218
| "Headphones" | 250 | TRUE | 'Budget'
219-
| "Phone" | 600 | FALSE | 'High-end'
219+
| "Phone" | 500 | FALSE | 'High-end'
220220
| "Laptop" | 1000 | FALSE | 'High-end'
221221
222222
4+d|Rows: 5

modules/ROOT/pages/clauses/merge.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,20 +375,21 @@ Cannot merge the following relationship because of null property value for 'sinc
375375

376376
[NOTE]
377377
====
378-
As of Neo4j 5.20, specifying a property of an entity (node or relationship) by referring to the property of another entity in the same `MERGE` clause is deprecated.
378+
Specifying a property of an entity (node or relationship) by referring to the property of another entity within the same `MERGE` clause is not allowed.
379379
380-
For example, referring to `charlie.bornIn` in the property definition of `oliver.bornIn` is deprecated.
380+
For example, referring to `charlie.bornIn` in the property definition of `oliver.bornIn` is not allowed.
381381
382382
.Query
383-
[source, cypher]
383+
[source, cypher, role=test-fail]
384384
----
385385
MERGE (charlie:Person {name: 'Charlie Sheen', bornIn: 'New York'})-[:ACTED_IN]->(movie:Movie)<-[:DIRECTED]-(oliver:Person {name: 'Oliver Stone', bornIn: charlie.bornIn})
386386
RETURN movie
387387
----
388388
389-
[source, deprecation]
389+
.Error message
390+
[source, error]
390391
----
391-
Merging an entity (charlie) and referencing that entity in a property definition in the same MERGE is deprecated.
392+
The Node variable 'charlie' is referencing a Node that is created in the same MERGE clause which is not allowed. Please only reference variables created in earlier clauses
392393
----
393394
====
394395

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ REVOKE ROLE missingRole FROM bob
9999
a|
100100
Errors have replaced notifications for impossible link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/manage-roles/#access-control-revoke-roles[`REVOKE`] commands where a user, role, or database does not exist.
101101

102+
a|
103+
label:functionality[]
104+
label:removed[]
105+
[source, cypher, role="noheader"]
106+
----
107+
MERGE (a {foo:1})-[:T]->(b {foo:a.foo})
108+
----
109+
a|
110+
It is no longer possible to specify a property of one entity (node or relationship) by referring to another entity’s property within the same `MERGE` clause.
111+
102112
|===
103113

104114

modules/ROOT/pages/expressions/map-expressions.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ Map projection with a variable selector is useful when you want to project value
376376
----
377377
MATCH (keanu:Person {name: 'Keanu Reeves'})
378378
LET dob = date('1964-09-02'), birthPlace = 'Beirut, Lebanon'
379-
RETURN keanu{.name, dob, birthplace} AS projectedKeanu
379+
RETURN keanu{.name, dob, birthPlace} AS projectedKeanu
380380
----
381381
// end::expressions_map_projection_variable_selector[]
382382

modules/ROOT/pages/functions/mathematical-trigonometric.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ The hyperbolic cotangent of `0.7` is returned.
367367
|===
368368
369369
| coth(0.7)
370-
| 1.654621635803
370+
| 1.6546216358026298
371371
1+d|Rows: 1
372372
373373
|===
@@ -668,7 +668,7 @@ The hyperbolic sine of `0.7` is returned.
668668
|===
669669
670670
| sinh(0.7)
671-
| 0.75858370184
671+
| 0.7585837018395334
672672
1+d|Rows: 1
673673
674674
|===
@@ -762,7 +762,7 @@ The hyperbolic tangent of `0.7` is returned.
762762
|===
763763
764764
| tanh(0.7)
765-
| 0.604367777117
765+
| 0.6043677771171636
766766
1+d|Rows: 1
767767
768768
|===

0 commit comments

Comments
 (0)