diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 61b5c10..f092a73 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -1084,14 +1084,21 @@ MATCH (n) RETURN (n) ==== [#_deprecated_notifications] -== `DEPRECATION` category +== `DEPRECATION` notifications -Notifications within the deprecation category contain information about a feature or functionality which has been deprecated. It is important to change to the new functionality, otherwise, the query might break in a future version. +Notifications within this group contain information about a deprecated feature or functionality. +It is important to change to the new functionality; otherwise, the query might break in a future version. [#_neo_clientnotification_statement_featuredeprecationwarning] === FeatureDeprecationWarning -.Notification details +==== Notification details + +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== + [cols="<1s,<4"] |=== |Neo4j code @@ -1104,8 +1111,253 @@ m|WARNING m|DEPRECATION |=== -.Colon after the | in a relationship pattern -==== +====== +[.include-with-GQLSTATUS-code] +====== + +[cols="<1s,<4"] +|=== +|GQLSTATUS code +m|01N00 +|StatusDescription +a|warn: feature deprecated. $msg +|Severity +m|WARNING +|Classification +m|DEPRECATION +|=== + +[cols="<1s,<4"] +|=== +|GQLSTATUS code +m|01N01 +|StatusDescription +a|warn: feature deprecated with replacement. `$thing1` is deprecated. It is replaced by `$thing2`. +|Severity +m|WARNING +|Classification +m|DEPRECATION +|=== + +[cols="<1s,<4"] +|=== +|GQLSTATUS code +m|01N02 +|StatusDescription +a|warn: feature deprecated without replacement. `$thing` is deprecated and will be removed without a replacement. +|Severity +m|WARNING +|Classification +m|DEPRECATION +|=== + +[cols="<1s,<4"] +|=== +|GQLSTATUS code +m|01N03 +|StatusDescription +a|warn: procedure result column deprecated. `$field` returned by procedure `$proc` is deprecated. +|Severity +m|WARNING +|Classification +m|DEPRECATION +|=== + +====== +===== + +==== Examples of using deprecated features + +.Create a database with an unescaped name containing a dot +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo.bar +---- + +Description of the returned code:: +Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. +Names containing `.` should be escaped. (Name: `foo.bar`) + +Suggestions for improvement:: +If not intended for a composite database, escape the name with the character ```. ++ +[source,cypher] +---- +CREATE DATABASE `foo.bar` +---- + +====== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo.bar +---- + +Returned GQLSTATUS code:: +01N00 + +Returned Status Description:: +warn: feature deprecated. +Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. Names containing `.` should be escaped. (Name: foo.bar) + +Suggestions for improvement:: +If not intended for a composite database, escape the name with the character ```. ++ +[source,cypher] +---- +CREATE DATABASE `foo.bar` +---- +====== +===== + +.Using differently ordered return items in a `UNION` clause +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +RETURN 'val' as one, 'val' as two +UNION +RETURN 'val' as two, 'val' as one +---- + +Description of the returned code:: +All subqueries in a UNION [ALL] should have the same ordering for the return columns. +Using differently ordered return items in a UNION [ALL] clause is deprecated and will be removed in a future version. + +Suggestions for improvement:: +Use the same order for the return columns in all subqueries combined by a `UNION` clause. + ++ +[source,cypher] +---- +RETURN 'val' as one, 'val' as two +UNION +RETURN 'val' as one, 'val' as two +---- + +====== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +RETURN 'val' as one, 'val' as two +UNION +RETURN 'val' as two, 'val' as one +---- + +Returned GQLSTATUS code:: +01N00 + +Returned Status Description:: +warn: feature deprecated. +All subqueries in a UNION [ALL] should have the same ordering for the return columns. Using differently ordered return items in a UNION [ALL] clause is deprecated and will be removed in a future version. + +Suggestions for improvement:: +Use the same order for the return columns in all subqueries combined by a `UNION` clause. + ++ +[source,cypher] +---- +RETURN 'val' as one, 'val' as two +UNION +RETURN 'val' as one, 'val' as two +---- +====== +===== + +.Using the Unicode \u0085 in an unescaped identifier +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +RETURN 1 as my\u0085identifier +---- +Description of the returned code:: +The Unicode character `\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. To continue using it, escape the identifier by adding backticks around the identifier `my\u0085identifier`. + +====== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +RETURN 1 as my\u0085identifier +---- + +Returned GQLSTATUS code:: +01N00 + +Returned Status Description:: +warn: feature deprecated. +The Unicode character `\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. To continue using it, escape the identifier by adding backticks around the identifier `my\u0085identifier`. +====== +===== + + +==== Examples of using deprecated features without a future replacement + +.Using Cypher query option `connectComponentsPlanner` +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +CYPHER connectComponentsPlanner=greedy MATCH (a), (b) RETURN * +---- +Description of the returned code:: +The Cypher query option `connectComponentsPlanner` is deprecated and will be removed without a replacement. +The product's default behavior of using a cost-based IDP search algorithm when combining sub-plans will be kept. +For more information, see link:https://neo4j.com/docs/cypher-manual/current/query-tuning/query-options/#cypher-planner[Cypher manual -> Cypher planner]. + +====== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +CYPHER connectComponentsPlanner=greedy MATCH (a), (b) RETURN * +---- + +Returned GQLSTATUS code:: +01N02 + +Returned Status Description:: +warn: feature deprecated without replacement. +`connectComponentsPlanner` is deprecated and will be removed without a replacement. +====== +===== + +==== Examples of using a deprecated feature that will be replaced in the future + +.Colon after the vertical bar `|:` in a relationship pattern +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== Query:: + [source,cypher] @@ -1114,19 +1366,74 @@ MATCH (a)-[:A|:B|:C]-() RETURN * ---- Description of the returned code:: -The semantics of using colon in the separation of alternative relationship types will change in a future version. (Please use ':A|B|C' instead) +The semantics of using colon in the separation of alternative relationship types will change in a future version. (Please use ':A|B|C' instead) + +Suggestions for improvement:: +Remove the colon inside the relationship type expression. ++ +[source,cypher] +---- +MATCH (a)-[:A|B|C]-() RETURN * +---- + +====== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a)-[:A|:B|:C]-() RETURN * +---- + +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`:A|:B|:C` is deprecated. +It is replaced by `:A|B|C`. + +Suggestions for improvement:: +Remove the colon inside the relationship type expression. ++ +[source,cypher] +---- +MATCH (a)-[:A|B|C]-() RETURN * +---- + +====== +===== + +.Setting properties using a node +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a)-[]-(b) +SET a = b +---- + +Description of the returned code:: +The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. +Please use `properties()` instead. Suggestions for improvement:: -Remove the colon inside the relationship type expression. +Use the `properties()` function to get all properties from `b`. + [source,cypher] ---- -MATCH (a)-[:A|B|C]-() RETURN * +MATCH (a)-[]-(b) +SET a = properties(b) ---- -==== -.Setting properties using a node -==== +====== +[.include-with-GQLSTATUS-code] +====== Query:: + [source,cypher] @@ -1135,8 +1442,13 @@ MATCH (a)-[]-(b) SET a = b ---- -Description of the returned code:: -The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. Please use `properties()` instead. +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`SET a = b` is deprecated. +It is replaced by `SET a = properties(b)`. Suggestions for improvement:: Use the `properties()` function to get all properties from `b`. @@ -1146,10 +1458,16 @@ Use the `properties()` function to get all properties from `b`. MATCH (a)-[]-(b) SET a = properties(b) ---- -==== + +====== +===== + .Setting properties using a relationship -==== +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== Query:: + [source,cypher] @@ -1159,20 +1477,54 @@ SET a += r ---- Description of the returned code:: -The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. Please use `properties()` instead. +The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. +Please use `properties()` instead. Suggestions for improvement:: -Use the `properties()` function to get all properties from `r` +Use the `properties()` function to get all properties from `r`. + [source,cypher] ---- MATCH (a)-[r]-(b) SET a += properties(r) ---- -==== + +====== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +MATCH (a)-[r]-(b) +SET a += r +---- + +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`SET a += r` is deprecated. +It is replaced by `SET a += properties(r)`. + +Suggestions for improvement:: +Use the `properties()` function to get all properties from `r`. ++ +[source,cypher] +---- +MATCH (a)-[r]-(b) +SET a += properties(r) +---- +====== +===== + .Shortest path with a fixed relationship length -==== +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== Query:: + [source,cypher] @@ -1192,50 +1544,63 @@ Instead, you can rewrite it to the following: ---- MATCH (a: Start)-[r]->(b: End) RETURN b LIMIT 1 ---- -==== - -.Create a database with an unescaped name containing a dot -==== +====== +[.include-with-GQLSTATUS-code] +====== Query:: + [source,cypher] ---- -CREATE DATABASE foo.bar +MATCH (a:Start), shortestPath((a)-[r]->()) RETURN a ---- -Description of the returned code:: -Databases and aliases with unescaped `.` are deprecated unless to indicate that they belong to a composite database. -Names containing `.` should be escaped. (Name: `foo.bar`) +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`shortestPath\((a)-[r]->())` is deprecated. +It is replaced by `shortestPath\((n)-[r*1..1]->(m))`. Suggestions for improvement:: -If not intended for a composite database, escape the name with the character ```. +If the relationship length is fixed, there is no reason to search for the shortest path. +Instead, you can rewrite it to the following: + [source,cypher] ---- -CREATE DATABASE `foo.bar` +MATCH (a: Start)-[r]->(b: End) RETURN b LIMIT 1 ---- -==== - -.A procedure has been deprecated or renamed -==== +====== +===== +.Using a deprecated runtime option +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== +Query:: ++ [source,cypher] ---- -CALL unsupported.dbms.shutdown +CYPHER runtime = interpreted MATCH (n) RETURN n ---- Description of the returned code:: -The query used a deprecated procedure: `'unsupported.dbms.shutdown'`. +The query used a deprecated runtime option. (`'runtime=interpreted'` is deprecated, please use `'runtime=slotted'` instead) Suggestions for improvement:: -Remove the use of the deprecated procedure. -If there is a suggested replacement, update to use the replacement instead. - -==== +Runtime `interpreted` is deprecated and another runtime is used instead. +Alternatively, you can remove the runtime option to use the default runtime. ++ +[source,cypher] +---- +MATCH (n) RETURN n +---- -.Using a deprecated runtime option -==== +====== +[.include-with-GQLSTATUS-code] +====== Query:: + [source,cypher] @@ -1243,20 +1608,30 @@ Query:: CYPHER runtime = interpreted MATCH (n) RETURN n ---- -Description of the returned code:: -The query used a deprecated runtime option. (`'runtime=interpreted'` is deprecated, please use `'runtime=slotted'` instead) +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`runtime=interpreted` is deprecated. +It is replaced by `runtime=slotted`. Suggestions for improvement:: -Runtime `interpreted` is deprecated, use another runtime or remove the runtime option to use the default runtime. +Runtime `interpreted` is deprecated and another runtime is used instead. +Alternatively, you can remove the runtime option to use the default runtime. + [source,cypher] ---- MATCH (n) RETURN n ---- -==== +====== +===== .Using the `text-1.0` index provider when creating a text index -==== +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== Query:: + [source,cypher] @@ -1275,37 +1650,94 @@ Update the option `indexProvider` with the value `text-2.0`. ---- CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-2.0'} ---- -==== -.Using differently ordered return items in a `UNION` clause -==== +====== +[.include-with-GQLSTATUS-code] +====== Query:: + [source,cypher] ---- -RETURN 'val' as one, 'val' as two -UNION -RETURN 'val' as two, 'val' as one +CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-1.0'} +---- + +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`text-1.0` is deprecated. +It is replaced by `text-2.0`. + +Suggestions for improvement:: +Update the option `indexProvider` with the value `text-2.0`. ++ +[source,cypher] +---- +CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-2.0'} +---- +====== +===== + + + +.Using a renamed or a deprecated procedure +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== + +[source,cypher] +---- +CALL unsupported.dbms.shutdown ---- Description of the returned code:: -All subqueries in a UNION [ALL] should have the same ordering for the return columns. -Using differently ordered return items in a UNION [ALL] clause is deprecated and will be removed in a future version. +The query used a deprecated procedure: `'unsupported.dbms.shutdown'`. Suggestions for improvement:: -Use the same order for the return columns in all subqueries combined by a `UNION` clause. +Remove the use of the deprecated procedure. +If there is a suggested replacement, update to use the replacement instead. -+ +====== +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== [source,cypher] ---- -RETURN 'val' as one, 'val' as two -UNION -RETURN 'val' as one, 'val' as two +CALL cdc.query ---- -==== + +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`cdc.query` is deprecated. +It is replaced by `db.cdc.query`. + +====== +[.include-with-GQLSTATUS-deprecated-without-replacement] +====== +[source,cypher] +---- +CALL unsupported.dbms.shutdown +---- + +Returned GQLSTATUS code:: +01N02 + +Returned Status Description:: +warn: feature deprecated without replacement. +`unsupported.dbms.shutdown` is deprecated and will be removed without a replacement. +====== +===== .Using id() function -==== +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== + Query:: + [source,cypher] @@ -1313,8 +1745,10 @@ Query:: MATCH (a) RETURN id(a) ---- + Description of the returned code:: The query used a deprecated function: `id`. + Suggestions for improvement:: Use the function `elementId()` instead. + @@ -1323,39 +1757,62 @@ Use the function `elementId()` instead. MATCH (a) RETURN elementId(a) ---- -==== - -.Using Cypher query option connectComponentsPlanner -==== +====== +[.include-with-GQLSTATUS-deprecated-with-replacement] +====== Query:: + [source,cypher] ---- -CYPHER connectComponentsPlanner=greedy MATCH (a), (b) RETURN * +MATCH (a) +RETURN id(a) ---- -Description of the returned code:: -The Cypher query option `connectComponentsPlanner` is deprecated and will be removed without a replacement. -The product's default behavior of using a cost-based IDP search algorithm when combining sub-plans will be kept. -For more information, see link:https://neo4j.com/docs/cypher-manual/current/query-tuning/query-options/#cypher-planner[Cypher manual -> Cypher planner]. -==== -.Using the unicode \u0085 in an unescaped identifier -==== +Returned GQLSTATUS code:: +01N01 + +Returned Status Description:: +warn: feature deprecated with replacement. +`id` is deprecated. +It is replaced by `elementId()`. + +Suggestions for improvement:: +Use the function `elementId()` instead. ++ +[source,cypher] +---- +MATCH (a) +RETURN elementId(a) +---- +====== +[.include-with-GQLSTATUS-deprecated-without-replacement] +====== Query:: + [source,cypher] ---- -RETURN 1 as my\u0085identifier +MATCH (a) +RETURN id(a) ---- -Description of the returned code:: -The Unicode character \`\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. To continue using it, escape the identifier by adding backticks around the identifier \`myÂ…identifier`. -==== + +Returned GQLSTATUS code:: +01N02 + +Returned Status Description:: +warn: feature deprecated without replacement. +`id` is deprecated and will be removed without a replacement. +====== +===== [#_neo_clientnotification_request_deprecatedformat] === DeprecatedFormat +==== Notification details -.Notification details +[.tabbed-example] +===== +[.include-with-neo4j-code] +====== [cols="<1s,<4"] |=== |Neo4j code @@ -1368,6 +1825,23 @@ m|WARNING m|DEPRECATION |=== +====== +[.include-with-GQLSTATUS-code] +====== +[cols="<1s,<4"] +|=== +|GQLSTATUS code +m|01N01 +|StatusDescription +a|warn: feature deprecated with replacement. `$thing1` is deprecated. It is replaced by `$thing2`. +|Severity +m|WARNING +|Classification +m|DEPRECATION +|=== +====== +===== + [#_security_notifications] == `SECURITY` category