diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 8839f92c..b80ed9fe 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -1310,6 +1310,7 @@ a| To continue using it, escape the identifier by adding backticks around the identifier `%s`. - The character with the Unicode representation `%s` is deprecated for unescaped identifiers and will not be supported in the future. To continue using it, escape the identifier by adding backticks around the identifier `%s`. +- `%s` subquery without a variable scope clause is deprecated. Use CALL (`%s`) { ... } - All subqueries in a `UNION [ALL]` should have the same ordering for the return columns. [NOTE] In versions 5.5 to 5.25, using differently ordered return items in a `UNION [ALL]` clause is deprecated. @@ -1626,6 +1627,73 @@ The Unicode character `\u0085` is deprecated for unescaped identifiers and will ====== ===== +.Using a CALL subquery scope without a variable scope clause +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL { + WITH nbr + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- + +Returned GQLSTATUS code:: +01N00 + +Returned status description:: +warn: feature deprecated. +`CALL` subquery without a variable scope clause is deprecated. Use `CALL (nbr) {...}` + +Suggestions for improvement:: +Replace the importing `WITH` with a variable scope clause. ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL (nbr) { + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- + +====== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL { + WITH nbr + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- +Description of the returned code:: +`CALL` subquery without a variable scope clause is deprecated. Use `CALL (nbr) {...}` + +Suggestions for improvement:: +Replace the importing `WITH` with a variable scope clause. ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL (nbr) { + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- +====== +===== + .Deprecated function namespace [.tabbed-example] ===== @@ -5073,14 +5141,14 @@ m|Neo.ClientNotification.Statement.SubqueryVariableShadowing a|Variable in subquery is shadowing a variable with the same name from the outer scope. |Description |Variable in subquery is shadowing a variable with the same name from the outer scope. -If you want to use that variable instead, it must be imported into the subquery using importing WITH clause. (`%s`) +If you want to use that variable instead, it must be imported into the subquery using a variable scope clause. (`%s`) |Category m|GENERIC |GQLSTATUS code m|03N60 |Status description a|info: subquery variable shadowing. -The variable `{ <> }` in the subquery uses the same name as a variable from the outer query. Use `WITH { <> }` in the subquery to import the one from the outer scope unless you want it to be a new variable. +The variable `{ <> }` in the subquery uses the same name as a variable from the outer query. Use `{ <> } ({ <> })` to import the one from the outer scope unless you want it to be a new variable. |Classification m|GENERIC |SeverityLevel @@ -5110,17 +5178,16 @@ Returned GQLSTATUS code:: Returned status description:: info: subquery variable shadowing. The variable `n` in the subquery uses the same name as a variable from the outer query. -Use `WITH n` in the subquery to import the one from the outer scope unless you want it to be a new variable. +Use `CALL (n)` to import the one from the outer scope unless you want it to be a new variable. Suggestions for improvement:: If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. -If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. +If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using a variable scope clause. + [source,cypher] ---- MATCH (n) -CALL { - WITH n +CALL (n) { MATCH (n)--(m) RETURN m } @@ -5143,17 +5210,16 @@ RETURN * Description of the returned code:: Variable in subquery is shadowing a variable with the same name from the outer scope. -If you want to use that variable instead, it must be imported into the subquery using importing `WITH` clause. (the shadowing variable is: `n`) +If you want to use that variable instead, it must be imported into the subquery using a variable scope clause. (the shadowing variable is: `n`) Suggestions for improvement:: If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. -If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. +If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using a variable scope clause. + [source,cypher] ---- MATCH (n) -CALL { - WITH n +CALL (n) { MATCH (n)--(m) RETURN m }