Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 76 additions & 10 deletions modules/ROOT/pages/notifications/all-notifications.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 now 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.
Expand Down Expand Up @@ -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 now 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 now 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]
=====
Expand Down Expand Up @@ -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 `{ <<variable>> }` in the subquery uses the same name as a variable from the outer query. Use `WITH { <<variable>> }` in the subquery to import the one from the outer scope unless you want it to be a new variable.
The variable `{ <<variable>> }` in the subquery uses the same name as a variable from the outer query. Use `{ <<clause>> } ({ <<variable>> })` to import the one from the outer scope unless you want it to be a new variable.
|Classification
m|GENERIC
|SeverityLevel
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down