Skip to content

Commit 63be207

Browse files
clarification
1 parent 4987954 commit 63be207

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

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

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -157,22 +157,6 @@ dbms.upgradeStatus()
157157
a| These procedures have been removed from Cypher 25.
158158
For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/[Operations Manual -> Procedures].
159159

160-
a|
161-
label:functionality[]
162-
label:removed[]
163-
[source, cypher, role="noheader"]
164-
----
165-
WITH 1 AS g
166-
RETURN COLLECT {
167-
UNWIND [1,2,3] AS x
168-
WITH * WHERE x < 0
169-
WITH COUNT(*) AS agg
170-
RETURN agg + g
171-
} AS x
172-
----
173-
174-
a| The xref:subqueries/collect.adoc[`COLLECT`], xref:subqueries/count.adoc[`COUNT`], and xref:subqueries/existential.adoc[`EXISTS`] subquery expressions no longer use imported variables as grouping variables in aggregations.
175-
176160
|===
177161

178162
=== Deprecated in Cypher 25
@@ -202,6 +186,35 @@ For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/d
202186
| Feature
203187
| Details
204188

189+
a|
190+
label:functionality[]
191+
label:updated[]
192+
[source, cypher, role="noheader"]
193+
----
194+
WITH 1 AS g
195+
RETURN COLLECT {
196+
UNWIND [1,2,3] AS x
197+
WITH * WHERE x < 0
198+
WITH count(*) AS agg
199+
RETURN agg + g
200+
} AS x
201+
----
202+
203+
a| Imported variables are now correctly handled as constants inside xref:subqueries/collect.adoc[`COLLECT`], xref:subqueries/count.adoc[`COUNT`], and xref:subqueries/existential.adoc[`EXISTS`] subqueries expressions.
204+
The example query previously returned no results (`[]`) because the imported variable was used incorrectly as an implicit grouping key.
205+
It now returns `[1]`, since the variable is not used as a grouping key, allowing `count(*)` to return `0` and `0 + g` to evaluate to `1`.
206+
207+
a|
208+
label:functionality[]
209+
label:updated[]
210+
[source, cypher, role="noheader"]
211+
----
212+
RETURN $0hello
213+
----
214+
215+
a| Parameters can start with extended identifier characters (such as numbers), in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard.
216+
For more information, see xref:syntax/parameters.adoc[].
217+
205218
a|
206219
label:functionality[]
207220
label:updated[]
@@ -222,16 +235,6 @@ MATCH SHORTEST $param GROUPS (:A)-[:R]->{0,10}(:B)
222235

223236
a| Parameters can now be used in xref:patterns/shortest-paths.adoc[`SHORTEST` and `ANY` path patterns].
224237

225-
a|
226-
label:functionality[]
227-
label:updated[]
228-
[source, cypher, role="noheader"]
229-
----
230-
RETURN $0hello
231-
----
232-
233-
a| Parameters can start with extended identifier characters, in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard.
234-
235238
a|
236239
label:functionality[]
237240
label:updated[]

modules/ROOT/pages/syntax/parameters.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ Parameters cannot be used for the following constructs, as these form part of th
2626
* Relationship types; `MATCH (n)-[:$param]->(m)` is invalid.
2727
* Node labels; `MATCH (n:$param)` is invalid.
2828

29-
Parameters may consist of any combination of letters and numbers, and can start with any of xref:appendix/gql-conformance/index.adoc[GQL's] extended character identifiers.
29+
Parameter names can start with and contain underscores, letters, numbers, and combining marks such as accents (e.g., `é`).
30+
Currency symbols (e.g., `$` and `€`), non-printable Unicode control characters that only affect formatting (e.g., `\t` for Tab), punctuation (e.g., `!`), and whitespaces are not allowed in any position of a parameter name.
31+
For example, `$héllo`, `$0param`, and `$_param` are valid, while `$€value`, `$hello!`, and `$bad param` are not.
3032

3133
Setting parameters when running a query is dependent on the client environment.
3234
For example:

0 commit comments

Comments
 (0)