From 69a4d1059f0cbefd95f674619dccec280a0fe80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 18 Jun 2025 14:46:27 +0200 Subject: [PATCH 1/7] add missing 25 changes --- .../pages/appendix/gql-conformance/index.adoc | 2 +- .../gql-conformance/supported-mandatory.adoc | 4 +- ...ions-additions-removals-compatibility.adoc | 56 ++++++++++++++----- modules/ROOT/pages/syntax/parameters.adoc | 2 +- 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/modules/ROOT/pages/appendix/gql-conformance/index.adoc b/modules/ROOT/pages/appendix/gql-conformance/index.adoc index b269905ad..718d85745 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/index.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/index.adoc @@ -1,7 +1,7 @@ :description: Overview of Cypher's conformance to GQL. = GQL conformance -*Last updated*: 2 June 2025 + +*Last updated*: 18 June 2025 + *Neo4j version*: 2025.06 GQL is the new link:https://www.iso.org/home.html[ISO] International Standard query language for graph databases. diff --git a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc index 12bfb44a1..f76c5ca04 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc @@ -211,10 +211,8 @@ In Cypher, `trim()` removes any whitespace character. | 21.1 | Names and variables | xref:syntax/index.adoc[] -| Cypher supports GQL’s lexical elements, with the following caveats: +| Cypher supports GQL’s lexical elements, with the following caveat: -* GQL allows for extended parameter identifiers. -For example: `RETURN $0hello` is allowed in GQL but not Cypher. * GQL allows identifiers that are not variables to be delimited with both backticks and quotes. Cypher only allows backticks. For example: `MATCH (n) RETURN n."a prop"` is allowed in GQL but not Cypher. diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 576efb774..24b4d4719 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -38,7 +38,7 @@ label:removed[] RETURN 1 as my\u0085identifier ---- a| -The Unicode character \`\u0085` has been removed for unescaped identifiers and is now considered a whitespace character. +The Unicode character `\u0085` has been removed for unescaped identifiers and is now considered a whitespace character. To continue using it, escape the identifier by adding backticks around it. This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be \`my�identifier`. @@ -51,23 +51,23 @@ label:removed[] RETURN 1 as my$Identifier ---- a| -The character with the Unicode representation \`\u0024` has been removed for unescaped identifiers. To continue using it, escape the identifier by adding backticks around the identifier. +The character with the Unicode representation `\u0024` has been removed for unescaped identifiers. To continue using it, escape the identifier by adding backticks (++``++) around the identifier. This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be \`my$identifier`. The following Unicode Characters are removed in identifiers: -'\u0000', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005', '\u0006', '\u0007', -'\u0008', '\u000E', '\u000F', '\u0010', '\u0011', '\u0012', '\u0013', '\u0014', -'\u0015', '\u0016', '\u0017', '\u0018', '\u0019', '\u001A', '\u001B', '\u007F', -'\u0080', '\u0081', '\u0082', '\u0083', '\u0084', '\u0086', '\u0087', '\u0088', -'\u0089', '\u008A', '\u008B', '\u008C', '\u008D', '\u008E', '\u008F', '\u0090', -'\u0091', '\u0092', '\u0093', '\u0094', '\u0095', '\u0096', '\u0097', '\u0098', -'\u0099', '\u009A', '\u009B', '\u009C', '\u009D', '\u009E', '\u009F', '\u0024', -'\u00A2', '\u00A3', '\u00A4', '\u00A5', '\u00AD', '\u0600', '\u0601', '\u0602', -'\u0603', '\u0604', '\u0605', '\u061C', '\u06DD', '\u070F', '\u08E2', '\u180E', -'\u200B', '\u200C', '\u200D', '\u200E', '\u200F', '\u202A', '\u202B', '\u202C', -'\u202D', '\u202E', '\u2060', '\u2061', '\u2062', '\u2063', '\u2064', '\u2066', -'\u2067', '\u2068', '\u2069', '\u206A', '\u206B', '\u206C', '\u206D', '\u206E', -'\u206F', '\u2E2F', '\uFEFF', '\uFFF9', '\uFFFA', '\uFFFB' +`\u0000`, `\u0001`, `\u0002`, `\u0003`, `\u0004`, `\u0005`, `\u0006`, `\u0007`, +`\u0008`, `\u000E`, `\u000F`, `\u0010`, `\u0011`, `\u0012`, `\u0013`, `\u0014`, +`\u0015`, `\u0016`, `\u0017`, `\u0018`, `\u0019`, `\u001A`, `\u001B`, `\u007F`, +`\u0080`, `\u0081`, `\u0082`, `\u0083`, `\u0084`, `\u0086`, `\u0087`, `\u0088`, +`\u0089`, `\u008A`, `\u008B`, `\u008C`, `\u008D`, `\u008E`, `\u008F`, `\u0090`, +`\u0091`, `\u0092`, `\u0093`, `\u0094`, `\u0095`, `\u0096`, `\u0097`, `\u0098`, +`\u0099`, `\u009A`, `\u009B`, `\u009C`, `\u009D`, `\u009E`, `\u009F`, `\u0024`, +`\u00A2`, `\u00A3`, `\u00A4`, `\u00A5`, `\u00AD`, `\u0600`, `\u0601`, `\u0602`, +`\u0603`, `\u0604`, `\u0605`, `\u061C`, `\u06DD`, `\u070F`, `\u08E2`, `\u180E`, +`\u200B`, `\u200C`, `\u200D`, `\u200E`, `\u200F`, `\u202A`, `\u202B`, `\u202C`, +`\u202D`, `\u202E`, `\u2060`, `\u2061`, `\u2062`, `\u2063`, `\u2064`, `\u2066`, +`\u2067`, `\u2068`, `\u2069`, `\u206A`, `\u206B`, `\u206C`, `\u206D`, `\u206E`, +`\u206F`, `\u2E2F`, `\uFEFF`, `\uFFF9`, `\uFFFA`, `\uFFFB` a| label:functionality[] @@ -136,6 +136,22 @@ dbms.upgradeStatus() a| These procedures have been removed from Cypher 25. For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/[Operations Manual -> Procedures]. +a| +label:functionality[] +label:removed[] +[source, cypher, role="noheader"] +---- +WITH 1 AS g +RETURN COLLECT { + UNWIND [1,2,3] AS x + WITH * WHERE x < 0 + WITH COUNT(*) AS agg + RETURN agg + g +} AS x +---- + +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. + |=== @@ -166,6 +182,16 @@ MATCH SHORTEST $param GROUPS (:A)-[:R]->{0,10}(:B) a| Parameters can now be used in xref:patterns/shortest-paths.adoc[`SHORTEST` and `ANY` path patterns]. +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +RETURN $0hello +---- + +a| Cypher 25 supports parameters that can start with extended identifier characters, in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard. + a| label:functionality[] label:updated[] diff --git a/modules/ROOT/pages/syntax/parameters.adoc b/modules/ROOT/pages/syntax/parameters.adoc index 2ffe9de69..5f27d3b2a 100644 --- a/modules/ROOT/pages/syntax/parameters.adoc +++ b/modules/ROOT/pages/syntax/parameters.adoc @@ -26,7 +26,7 @@ Parameters cannot be used for the following constructs, as these form part of th * Relationship types; `MATCH (n)-[:$param]->(m)` is invalid. * Node labels; `MATCH (n:$param)` is invalid. -Parameters may consist of letters and numbers, and any combination of these, but cannot start with a number or a currency symbol. +Parameters may consist of letters and numbers, and any combination of these, and can start with any of xref:appendix/gql-conformance/index.adoc[GQL's] extended character identifiers. Setting parameters when running a query is dependent on the client environment. For example: From 98c13370b00a3a91ef77c90b188fe03fe29271df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 18 Jun 2025 14:49:05 +0200 Subject: [PATCH 2/7] rephrase --- modules/ROOT/pages/syntax/parameters.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/syntax/parameters.adoc b/modules/ROOT/pages/syntax/parameters.adoc index 5f27d3b2a..d760a4fb5 100644 --- a/modules/ROOT/pages/syntax/parameters.adoc +++ b/modules/ROOT/pages/syntax/parameters.adoc @@ -26,7 +26,7 @@ Parameters cannot be used for the following constructs, as these form part of th * Relationship types; `MATCH (n)-[:$param]->(m)` is invalid. * Node labels; `MATCH (n:$param)` is invalid. -Parameters may consist of letters and numbers, and any combination of these, and can start with any of xref:appendix/gql-conformance/index.adoc[GQL's] extended character identifiers. +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. Setting parameters when running a query is dependent on the client environment. For example: From 49879542bfdedcf6b487e163c0159552d338398b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 18 Jun 2025 14:54:33 +0200 Subject: [PATCH 3/7] concision --- .../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 5b320b548..644c61eda 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -230,7 +230,7 @@ label:updated[] RETURN $0hello ---- -a| Cypher 25 supports parameters that can start with extended identifier characters, in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard. +a| Parameters can start with extended identifier characters, in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard. a| label:functionality[] From 63be20758f3b4835c5f6cbf242be03f12e0a275e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Thu, 19 Jun 2025 13:00:44 +0200 Subject: [PATCH 4/7] clarification --- ...ions-additions-removals-compatibility.adoc | 55 ++++++++++--------- modules/ROOT/pages/syntax/parameters.adoc | 4 +- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 644c61eda..102b3303c 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -157,22 +157,6 @@ dbms.upgradeStatus() a| These procedures have been removed from Cypher 25. For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/[Operations Manual -> Procedures]. -a| -label:functionality[] -label:removed[] -[source, cypher, role="noheader"] ----- -WITH 1 AS g -RETURN COLLECT { - UNWIND [1,2,3] AS x - WITH * WHERE x < 0 - WITH COUNT(*) AS agg - RETURN agg + g -} AS x ----- - -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. - |=== === Deprecated in Cypher 25 @@ -202,6 +186,35 @@ For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/d | Feature | Details +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +WITH 1 AS g +RETURN COLLECT { + UNWIND [1,2,3] AS x + WITH * WHERE x < 0 + WITH count(*) AS agg + RETURN agg + g +} AS x +---- + +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. +The example query previously returned no results (`[]`) because the imported variable was used incorrectly as an implicit grouping key. +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`. + +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +RETURN $0hello +---- + +a| Parameters can start with extended identifier characters (such as numbers), in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard. +For more information, see xref:syntax/parameters.adoc[]. + a| label:functionality[] label:updated[] @@ -222,16 +235,6 @@ MATCH SHORTEST $param GROUPS (:A)-[:R]->{0,10}(:B) a| Parameters can now be used in xref:patterns/shortest-paths.adoc[`SHORTEST` and `ANY` path patterns]. -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -RETURN $0hello ----- - -a| Parameters can start with extended identifier characters, in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard. - a| label:functionality[] label:updated[] diff --git a/modules/ROOT/pages/syntax/parameters.adoc b/modules/ROOT/pages/syntax/parameters.adoc index d760a4fb5..1820abd17 100644 --- a/modules/ROOT/pages/syntax/parameters.adoc +++ b/modules/ROOT/pages/syntax/parameters.adoc @@ -26,7 +26,9 @@ Parameters cannot be used for the following constructs, as these form part of th * Relationship types; `MATCH (n)-[:$param]->(m)` is invalid. * Node labels; `MATCH (n:$param)` is invalid. -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. +Parameter names can start with and contain underscores, letters, numbers, and combining marks such as accents (e.g., `é`). +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. +For example, `$héllo`, `$0param`, and `$_param` are valid, while `$€value`, `$hello!`, and `$bad param` are not. Setting parameters when running a query is dependent on the client environment. For example: From 6094c51ddec6db07ef718deced596cb3848524b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Thu, 19 Jun 2025 13:10:45 +0200 Subject: [PATCH 5/7] unicode party --- ...precations-additions-removals-compatibility.adoc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 102b3303c..477725fb9 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -59,21 +59,22 @@ label:removed[] RETURN 1 as my\u0085identifier ---- a| -The Unicode character `\u0085` has been removed for unescaped identifiers and is now considered a whitespace character. -To continue using it, escape the identifier by adding backticks around it. +The Unicode character `\u0085` (`Next Line`) has been removed for unescaped identifiers and is now considered a whitespace character. +To continue using it, escape the identifier by adding backticks (++``++) around it. This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. -In the given example, the quoted identifier would be \`my�identifier`. +In the given example, the quoted identifier would be `my\u0085identifier`. a| label:functionality[] label:removed[] [source, cypher, role="noheader"] ---- -RETURN 1 as my$Identifier +RETURN 1 as my\u0024Identifier ---- a| -The character with the Unicode representation `\u0024` has been removed for unescaped identifiers. To continue using it, escape the identifier by adding backticks (++``++) around the identifier. -This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be \`my$identifier`. +The character with the Unicode representation `\u0024` (`$`) has been removed for unescaped identifiers. +To continue using it, escape the identifier by adding backticks (++``++) around the identifier. +This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be `my\u0024identifier`. The following Unicode Characters are removed in identifiers: `\u0000`, `\u0001`, `\u0002`, `\u0003`, `\u0004`, `\u0005`, `\u0006`, `\u0007`, From 4f74c7f9a09b481f8465cb8564f9ebd6f9f26c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Thu, 19 Jun 2025 13:43:31 +0200 Subject: [PATCH 6/7] dollar dollar bill --- .../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 477725fb9..ac1de7948 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -69,7 +69,7 @@ label:functionality[] label:removed[] [source, cypher, role="noheader"] ---- -RETURN 1 as my\u0024Identifier +RETURN 1 as my$Identifier ---- a| The character with the Unicode representation `\u0024` (`$`) has been removed for unescaped identifiers. From 2292a8a6375971c3ca16304fd635056756a01d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Thu, 19 Jun 2025 13:54:47 +0200 Subject: [PATCH 7/7] Update modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc --- .../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 ac1de7948..61354701b 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -201,7 +201,7 @@ RETURN COLLECT { } AS x ---- -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. +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`] subquery expressions. The example query previously returned no results (`[]`) because the imported variable was used incorrectly as an implicit grouping key. 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`.