From 245bf182207d8d68a362a78b53fff2cd1275292f Mon Sep 17 00:00:00 2001 From: hvub Date: Tue, 29 Oct 2024 10:57:47 +0100 Subject: [PATCH 1/3] cip-190 deprecations --- ...ions-additions-removals-compatibility.adoc | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index db0c05224..9e0798a57 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -16,6 +16,78 @@ New features are added to the language continuously, and occasionally, some feat This section lists all of the features that have been removed, deprecated, added, or extended in different Cypher versions. Replacement syntax for deprecated and removed features are also indicated. +[[cypher-deprecations-additions-removals-5.26]] +== Neo4j 5.26 + +=== Deprecated features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +MATCH (where {...}) +---- +---- +MATCH (...)-[where {...}]->() +---- +| The unescaped variable named `where` or `WHERE` (or in any other casing) in a node pattern or a relationship pattern if directly followed by a property key-value expression only is deprecated. Use backticks to escape the variable name: `MATCH (++`where`++ { ... })` or `MATCH (...)-[++`where`++ { ... }]->()`. + +a| +label:functionality[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +... + n:A +---- +---- +... + n:A&B +---- +---- +... + n:A&B\|C +---- +| The unparenthesized label expression predicate as right-hand side operand of `\+` is deprecated. Parenthesize the label expression predicate on the right-hand side of `+`: `... + (n:A)`. + +a| +label:functionality[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +CASE x ... WHEN is :: STRING THEN ... END +---- +| The type predicate expression on an unescaped variable named `is` or `IS` (or in any other casing) as a when operand of a simple `CASE` is deprecated. Use backticks to escape the variable name: `CASE x ... WHEN ++`is`++ :: STRING THEN ... END` + +a| +label:functionality[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +CASE x ... WHEN contains + 1 THEN ... END +---- +---- +CASE x ... WHEN contains - 1 THEN ... END +---- +| The addition or subtraction on an unescaped variable named `contains` or `CONTAINS` (or in any other casing) as a when operand of a simple `CASE` is deprecated. Use backticks to escape the variable name: `CASE x ... WHEN ++`contains`++ + 1 THEN ... END` or `CASE x ... WHEN ++`contains`++ - 1 THEN ... END` + +a| +label:functionality[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +CASE x ... WHEN in[1] THEN ... END +---- +---- +CASE x ... WHEN in["abc"] THEN ... END +---- +| The `[]` operator on an unescaped variable named `in` or `IN` (or in any other casing) as a when operand of a simple `CASE` is deprecated. Use backticks to escape the variable name: `CASE x ... WHEN ++`in`++[1] THEN ... END` or `CASE x ... WHEN ++`contains`++["abc"] THEN ... END` +|=== + + [[cypher-deprecations-additions-removals-5.25]] == Neo4j 5.25 From 36993c42053a19b7abc86c5407fddda233fcb6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:10:46 +0100 Subject: [PATCH 2/3] editorial update --- ...ions-additions-removals-compatibility.adoc | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 9e0798a57..b711656e9 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -36,7 +36,11 @@ MATCH (where {...}) ---- MATCH (...)-[where {...}]->() ---- -| The unescaped variable named `where` or `WHERE` (or in any other casing) in a node pattern or a relationship pattern if directly followed by a property key-value expression only is deprecated. Use backticks to escape the variable name: `MATCH (++`where`++ { ... })` or `MATCH (...)-[++`where`++ { ... }]->()`. +a| The unescaped variable named `where` (or any casing variant, like `WHERE`) used in a node or relationship pattern followed directly by a property key-value expression is deprecated. +To continue using variables with this name, use backticks to escape the variable name: + +* Node patterns: `MATCH (++`where`++ { ... })` +* Relationship patterns: `MATCH (...)-[++`where`++ { ... }]->()` a| label:functionality[] @@ -51,7 +55,8 @@ label:deprecated[] ---- ... + n:A&B\|C ---- -| The unparenthesized label expression predicate as right-hand side operand of `\+` is deprecated. Parenthesize the label expression predicate on the right-hand side of `+`: `... + (n:A)`. +a| Using an unparenthesized label expression predicate as the right-hand side operand of `+` is deprecated. +Parenthesize the label expression predicate on the right-hand side of `+`: `... + (n:A)`. a| label:functionality[] @@ -60,7 +65,8 @@ label:deprecated[] ---- CASE x ... WHEN is :: STRING THEN ... END ---- -| The type predicate expression on an unescaped variable named `is` or `IS` (or in any other casing) as a when operand of a simple `CASE` is deprecated. Use backticks to escape the variable name: `CASE x ... WHEN ++`is`++ :: STRING THEN ... END` +a| Using an unescaped variable named `is`(or any casing variant, like `IS`) as a `WHEN` operand in a simple xref:queries/case.adoc#case-simple[simple `CASE`] expression is deprecated. +To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: `CASE x ... WHEN ++`is`++ :: STRING THEN ... END` a| label:functionality[] @@ -72,7 +78,11 @@ CASE x ... WHEN contains + 1 THEN ... END ---- CASE x ... WHEN contains - 1 THEN ... END ---- -| The addition or subtraction on an unescaped variable named `contains` or `CONTAINS` (or in any other casing) as a when operand of a simple `CASE` is deprecated. Use backticks to escape the variable name: `CASE x ... WHEN ++`contains`++ + 1 THEN ... END` or `CASE x ... WHEN ++`contains`++ - 1 THEN ... END` +a| Using an unescaped variable named `contains` (or any casing variant, like `CONTAINS`) in addition or subtraction operations within a `WHEN` operand of a xref:queries/case.adoc#case-simple[simple `CASE`] expression is deprecated. +To continue using variables with this name, use backticks to escape the variable name: + +* Additions: `CASE x ... WHEN ++`contains`++ + 1 THEN ... END` +* Subtractions: `CASE x ... WHEN ++`contains`++ - 1 THEN ... END` a| label:functionality[] @@ -84,7 +94,12 @@ CASE x ... WHEN in[1] THEN ... END ---- CASE x ... WHEN in["abc"] THEN ... END ---- -| The `[]` operator on an unescaped variable named `in` or `IN` (or in any other casing) as a when operand of a simple `CASE` is deprecated. Use backticks to escape the variable name: `CASE x ... WHEN ++`in`++[1] THEN ... END` or `CASE x ... WHEN ++`contains`++["abc"] THEN ... END` +a| Using the `[]` operator on an unescaped variable named `in` (or any casing variant, like `IN`) within a `WHEN` operand of a xref:queries/case.adoc#case-simple[simple `CASE`] expression is deprecated. +To continue using variables with this name, use backticks to escape the variable name: + +* `CASE x ... WHEN ++`in`++[1] THEN ... END` +* `CASE x ... WHEN ++`in`++["abc"] THEN ... END` + |=== From e3cb5ef80a85ae2be2c1c0be6b35e1c0f6af90aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:04:53 +0100 Subject: [PATCH 3/3] Update modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc Co-authored-by: Hannes Voigt <30618026+hvub@users.noreply.github.com> --- .../pages/deprecations-additions-removals-compatibility.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index b711656e9..fdad9ca77 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -65,7 +65,7 @@ label:deprecated[] ---- CASE x ... WHEN is :: STRING THEN ... END ---- -a| Using an unescaped variable named `is`(or any casing variant, like `IS`) as a `WHEN` operand in a simple xref:queries/case.adoc#case-simple[simple `CASE`] expression is deprecated. +a| Using an unescaped variable named `is` (or any casing variant, like `IS`) as a `WHEN` operand in a xref:queries/case.adoc#case-simple[simple `CASE`] expression is deprecated. To continue using variables with this name in simple `CASE` expressions, use backticks to escape the variable name: `CASE x ... WHEN ++`is`++ :: STRING THEN ... END` a|