From 3104b8dfa74451365bfaceb1facee7c4d975f5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Fri, 27 Jun 2025 08:53:06 +0200 Subject: [PATCH] cypher 5 version control commands --- ...ions-additions-removals-compatibility.adoc | 117 +++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index e078f3ede..5df372b3c 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -19,7 +19,7 @@ Replacement syntax for deprecated and removed features are also indicated. [[cypher-deprecations-additions-removals-2025.06]] == Neo4j 2025.06 -=== Deprecated features +=== Deprecated in Cypher 5 [cols="2", options="header"] |=== @@ -50,6 +50,121 @@ In future Cypher versions, remove the backticks (`a.b.c`). |=== + +=== New in Cypher 5 + +[cols="2", options="header"] +|=== +| Feature +| Details +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +CREATE [COMPOSITE] DATABASE actors DEFAULT LANGUAGE CYPHER 25 +---- + +a| Set the default Cypher version for a standard or composite database when creating it. +The available versions are `CYPHER 25` and `CYPHER 5`. +If not specified, the default language for the database is set to the default language of the DBMS. +For more information, see the following sections in the Operations Manual: + +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database]. +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set the default Cypher version for a composite database]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +CREATE ALIAS `remote-with-default-language` +FOR DATABASE `northwind-graph-2020` + AT "neo4j+s://location:7687" + USER alice + PASSWORD 'example_secret' + DEFAULT LANGUAGE CYPHER 25 +---- + +a| Set the default Cypher version for a remote database alias when creating it. +The available versions are `CYPHER 5` and `CYPHER 25`. +Local database aliases and database aliases in composite databases cannot be assigned a default Cypher version. +Local database aliases always have the Cypher version of their target database and database aliases in composite databases always have the Cypher version of the composite database they belong to. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#_set_a_default_cypher_version_for_remote_database_aliases[Operations Manual -> Set a default Cypher version for remote database aliases]. + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25 +---- + +a| Alter the default Cypher version of an existing standard or composite database. +The available versions are `CYPHER 25` and `CYPHER 5`. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/#alter-database-default-language[Operations Manual -> Alter the default Cypher version of an existing database]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +ALTER ALIAS `remote-with-default-language` SET DATABASE DEFAULT LANGUAGE CYPHER 25 +---- + +a| Alter the default Cypher version of a remote database alias. +The available versions are `CYPHER 25` and `CYPHER 5`. +It is not possible to alter the default Cypher version of a local database alias or an alias belonging to a composite database. +Local database aliases always have the Cypher version of their target database and aliases belonging to composite databases always have the Cypher version of the composite database. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#alter-default-language-remote-database-alias[Operations Manual -> Alter the default Cypher version of a remote database alias]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +SHOW DATABASES YIELD name, defaultLanguage +---- + +a| The new return column `defaultLanguage` for the `SHOW DATABASE` command returns the default language of a database. +This column is not returned by default; it can only be returned using `YIELD`. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_the_default_cypher_version_of_a_database[Operations Manual -> Show the default Cypher version of a database]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +SHOW ALIAS `remote-with-default-language` FOR DATABASE YIELD name, defaultLanguage +---- + +a| The new return column `defaultLanguage` for the `SHOW ALIAS` command returns the default language of a database alias. +This column is not returned by default; it can only be returned using `YIELD`. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#manage-aliases-list[Operations Manual -> List database aliases]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +CYPHER 25 +MATCH (n:Person) +FILTER n.age < 35 +RETURN n.name AS name +---- + +a| New query option: `CYPHER 25`. +Prepending a query with `CYPHER 25` ensures that a query is run with Cypher 25, regardless of the default language of a database. +(The ability to select `CYPHER 5` was introduced in Neo4j 5.21). + +|=== + [[cypher-deprecations-additions-removals-2025.04]] == Neo4j 2025.04