Skip to content

Cypher25 default language #2372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 63 commits into
base: cypher-25
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
463a27e
WIP default language docs
mnd999 Feb 25, 2025
71a45d4
WIP default language docs
mnd999 Feb 25, 2025
83bd0db
WIP default language docs
mnd999 Feb 26, 2025
cb48c0b
Update modules/ROOT/pages/database-administration/standard-databases/…
mnd999 Feb 26, 2025
aa70f15
Add some sentences about default language and aliases
Hunterness Feb 26, 2025
1a5655d
Add info about default language clauses for aliases
Hunterness Mar 13, 2025
f213059
Document ALTER COMPOSITE DATABASE privilege
Hunterness Mar 28, 2025
3c3483e
Fixing smaller review comments
Hunterness Mar 28, 2025
f30c68c
See if adding width makes the images visible
Hunterness Mar 28, 2025
da55463
Update to handle the different syntaxes depending on cypher version
Hunterness Apr 4, 2025
5a5d54e
Add page for altering composite databases
Hunterness Apr 7, 2025
ff5a4c0
Default Cypher version
renetapopova May 29, 2025
ae4195a
add some labels and minor fixes
renetapopova May 30, 2025
4119532
add the missing partial file
renetapopova Jun 2, 2025
afd11e5
Update modules/ROOT/pages/configuration/cypher-version-configuration.…
renetapopova Jun 2, 2025
71d2f0b
Update modules/ROOT/pages/configuration/cypher-version-configuration.…
renetapopova Jun 2, 2025
8c5c302
Update modules/ROOT/pages/configuration/cypher-version-configuration.…
renetapopova Jun 2, 2025
642d3a1
Update modules/ROOT/pages/configuration/cypher-version-configuration.…
renetapopova Jun 2, 2025
4d677dd
Update modules/ROOT/pages/configuration/cypher-version-configuration.…
renetapopova Jun 2, 2025
71fbf70
update the Database management command syntax intro
renetapopova Jun 2, 2025
79fc1bf
Update modules/ROOT/pages/database-administration/aliases/manage-alia…
renetapopova Jun 10, 2025
c1c5910
Update modules/ROOT/pages/database-administration/standard-databases/…
renetapopova Jun 10, 2025
39ac4e7
Update modules/ROOT/pages/database-administration/standard-databases/…
renetapopova Jun 10, 2025
93b7a0b
apply suggestions from review
renetapopova Jun 23, 2025
cf3a24f
apply suggestions from review
renetapopova Jun 23, 2025
0e0ea5a
further improvements
renetapopova Jun 24, 2025
1faf1b8
add Jens suggestions
renetapopova Jun 24, 2025
7ca960c
update the driver settings
renetapopova Jun 25, 2025
e43b38d
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 26, 2025
a10c44c
Update modules/ROOT/pages/database-administration/index.adoc
renetapopova Jun 26, 2025
da114f7
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
2195640
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
862f8f4
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
53d7a06
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
32e0b71
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
17b4778
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
4b32ad5
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
1434700
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
2df0afc
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
a4a4a19
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
6a66259
Update modules/ROOT/pages/database-administration/aliases/manage-alia…
renetapopova Jun 27, 2025
fa26e30
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
589c50e
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
aef43ac
Update modules/ROOT/pages/configuration/cypher-version-configuration.…
renetapopova Jun 27, 2025
9577fb0
Update modules/ROOT/pages/database-administration/composite-databases…
renetapopova Jun 27, 2025
d2dac99
Update modules/ROOT/pages/database-administration/index.adoc
renetapopova Jun 27, 2025
4e02b7a
Update modules/ROOT/pages/database-administration/syntax.adoc
renetapopova Jun 27, 2025
038f4e7
Update modules/ROOT/pages/database-administration/aliases/manage-alia…
renetapopova Jun 27, 2025
fef39f4
Update modules/ROOT/pages/database-administration/aliases/manage-alia…
renetapopova Jun 27, 2025
a0d73c5
Update modules/ROOT/partials/cypher-versions.adoc
renetapopova Jun 27, 2025
b4e1dac
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
bf83fde
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
3fb6171
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
f21bb75
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
60a36c8
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
249909e
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
c9cc0f1
Update modules/ROOT/pages/authentication-authorization/dbms-administr…
renetapopova Jun 27, 2025
294d81a
apply suggestion from review
renetapopova Jun 27, 2025
4e02968
update the Cypher versions page
renetapopova Jun 27, 2025
c20f591
reconcile execute procedures with functions
renetapopova Jun 27, 2025
3b429d0
apply suggestions from review
renetapopova Jun 30, 2025
d5f1683
update the `admin` role privileges
renetapopova Jun 30, 2025
7a2d695
update the `admin` role privileges
renetapopova Jun 30, 2025
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
4 changes: 4 additions & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
** xref:configuration/file-locations.adoc[]
//** xref:configuration/network-architecture.adoc[]
** xref:configuration/ports.adoc[]
** xref:configuration/cypher-version-configuration.adoc[]
** xref:configuration/connectors.adoc[]
** xref:configuration/set-initial-password.adoc[]
** xref:configuration/neo4j-admin-memrec.adoc[]
Expand Down Expand Up @@ -116,6 +117,7 @@
*** xref:database-administration/standard-databases/seed-from-uri.adoc[]
*** xref:database-administration/standard-databases/listing-databases.adoc[]
*** xref:database-administration/standard-databases/alter-databases.adoc[]
*** xref:database-administration/standard-databases/start-stop-databases.adoc[]
*** xref:database-administration/standard-databases/recreate-database.adoc[]
*** xref:database-administration/standard-databases/delete-databases.adoc[]
*** xref:database-administration/standard-databases/migrate-database.adoc[]
Expand All @@ -132,6 +134,8 @@
*** xref:database-administration/composite-databases/concepts.adoc[]
*** xref:database-administration/composite-databases/create-composite-databases.adoc[]
*** xref:database-administration/composite-databases/list-composite-databases.adoc[]
*** xref:database-administration/composite-databases/alter-composite-databases.adoc[]
*** xref:database-administration/composite-databases/start-stop-composite-databases.adoc[]
*** xref:database-administration/composite-databases/delete-composite-databases.adoc[]
*** xref:database-administration/composite-databases/querying-composite-databases.adoc[]
*** xref:database-administration/composite-databases/sharding-with-copy.adoc[]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
751 changes: 1 addition & 750 deletions modules/ROOT/images/privileges_hierarchy_dbms.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,225 changes: 772 additions & 453 deletions modules/ROOT/pages/authentication-authorization/dbms-administration.adoc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/ROOT/pages/backup-restore/copy-database.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ If you go from `high_limit` to `standard` or `aligned`, there is no validation t
[role=label--enterprise-edition]
[NOTE]
====
The block format is the default format for all newly-created databases as long as they do not have the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] setting specified.
The block format is the default format for all newly created databases as long as they do not have the xref:configuration/configuration-settings.adoc#config_db.format[`db.format`] setting specified.
For more information on the block format, see xref:database-internals/store-formats.adoc[Store formats].
====

Expand Down
38 changes: 38 additions & 0 deletions modules/ROOT/pages/configuration/cypher-version-configuration.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[[cypher-version-configuration]]
= Configure the Cypher default version
:page-role: new-2025.06
:description: How to configure the Cypher default version.

You can specify the version of Cypher® in which you want to run your queries, choosing between Cypher 5 and Cypher 25.
Cypher 5 is the default version for all newly created databases, however, if you want to take advantage of the new features in Cypher 25, you can set the default version to Cypher 25.
For more information, see xref:introduction.adoc#_cypher_versions[Cypher® versions].

To specify the Cypher version, use one of the following options:

Configure a default Cypher version for the whole DBMS::
The default language version for the whole DBMS can be configured in the _neo4j.conf_ file using the setting xref:configuration/configuration-settings.adoc#config_db.query.default_language[db.query.default_language] (default value: CYPHER_5). +
Changing this setting in an existing DBMS *does not* affect existing databases.
It only applies to newly created databases unless the version is specified as part of the `CREATE` or `ALTER` database commands.

Configure a default Cypher version per database::
The default language for a specific database can be set using a Cypher database administration command with the `SET DEFAULT LANGUAGE` clause when creating the database or by altering the database after it has been created.
This clause determines the default Cypher version for the specified database, overriding the version set in the configuration file.
For example, `CREATE DATABASE mydb SET DEFAULT LANGUAGE CYPHER 25` or `ALTER DATABASE mydb SET DEFAULT LANGUAGE CYPHER 5`.
For more details and examples, see xref:database-administration/syntax.adoc#administration-syntax-database-management[Database management command syntax] and the respective pages in the xref:database-administration/index.adoc[] section. +
If not specified, the default language for the database is set to the default language of the DBMS.
Setting the default language on creation only require the correct `CREATE` privilege.
Modifying the default language for an existing standard database requires the `SET DATABASE DEFAULT LANGUAGE` privilege and for an existing composite database the `ALTER COMPOSITE DATABASE` privilege.
+
[NOTE]
====
Setting the default language to `CYPHER 25` ensures that all queries run on that database will use the version of `Cypher 25` that the database is currently running (unless you prepend your queries with `CYPHER 5`, which overrides this default).
For example, a Neo4j 2025.08 database with default language `Cypher 25` will use `Cypher 25` as it exists in Neo4j 2025.08, including any changes introduced in Neo4j 2025.06, 2025.07, and 2025.08.

Setting the default language to `CYPHER 5` ensures that all queries run on that database will use the version of `Cypher 5` as it existed at the time of the Neo4j 2025.06 release (unless you prepend your queries with `CYPHER 25`, which overrides this default).
Any changes introduced after the 2025.06 release will not affect the semantics of the query.
====

Set the Cypher version on a per-query basis::
The default language for a specific query can be set by prepending the query with the `CYPHER 5` or `CYPHER 25` keyword. +
For example, `CYPHER 25 MATCH (n) RETURN n` or `CYPHER 5 MATCH (n) RETURN n`.
This setting determines the language for the specified query, overriding the default language set in the configuration file and the database.
1 change: 1 addition & 0 deletions modules/ROOT/pages/configuration/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The topics described are:
* xref:configuration/file-locations.adoc[Default file locations] -- An overview of where files are stored in the different Neo4j distributions and the necessary file permissions for running Neo4j.
//* <<network-architecture, Network architecture>> -- A visual representation of the Neo4j network architecture.
* xref:configuration/ports.adoc[Ports] -- An overview of the ports relevant to a Neo4j installation.
* xref:configuration/cypher-version-configuration.adoc[Configure the Cypher default version] -- How to configure the Cypher version.
* xref:configuration/connectors.adoc[Configure network connectors] -- How to configure network connectors for Neo4j.
* xref:configuration/set-initial-password.adoc[Set initial password] -- How to set an initial password.
* xref:configuration/neo4j-admin-memrec.adoc[Get initial memory recommendations] -- How to get initial memory recommendations for Neo4j.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
= Managing database aliases in composite databases

Both local and remote database aliases can be created as part of a composite database.
Starting with Neo4j 2025.04, a database alias can also be set as the default database for a composite database.

////
[source, cypher, role=test-setup]
Expand All @@ -18,6 +17,12 @@ CREATE DATABASE `perennial-flowers`;
----
////

[NOTE]
====
Starting with Neo4j 2025.06, a database or remote alias can be assigned a default Cypher version.
However, local aliases and aliases in composite databases cannot be assigned a default Cypher version.
Local aliases always get the Cypher version of their target database and aliases in composite databases always get the Cypher version of the composite database.
====

[[manage-aliases-composite-databases-list]]
== List database aliases in composite databases
Expand Down Expand Up @@ -153,14 +158,14 @@ SHOW ALIASES FOR DATABASE YIELD *
.Result
[role="queryresult"]
----
+-----------------------------------------------------------------------------------------------------------------------------------+
| name | composite | database | location | url | user | driver | properties |
+-----------------------------------------------------------------------------------------------------------------------------------+
| "garden.flowers" | "garden" | "perennial-flowers" | "local" | NULL | NULL | NULL | {perennial: TRUE} |
| "garden.trees" | "garden" | "updatedtrees" | "remote" | "neo4j+s://location:7687" | "alice" | {} | {treeversion: 2} |
| "library.romance" | "library" | "romance-books" | "remote" | "neo4j+s://location:7687" | "alice" | {} | {} |
| "library.sci-fi" | "library" | "sci-fi-books" | "local" | NULL | NULL | NULL | {} |
+-----------------------------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| name | composite | database | location | url | user | driver | defaultLanguage | properties |
+-----------------------------------------------------------------------------------------------------------------------------------------------------+
| "garden.flowers" | "garden" | "perennial-flowers" | "local" | NULL | NULL | NULL | NULL | {perennial: TRUE} |
| "garden.trees" | "garden" | "updatedtrees" | "remote" | "neo4j+s://location:7687" | "alice" | {} | NULL | {treeversion: 2} |
| "library.romance" | "library" | "romance-books" | "remote" | "neo4j+s://location:7687" | "alice" | {} | NULL | {} |
| "library.sci-fi" | "library" | "sci-fi-books" | "local" | NULL | NULL | NULL | NULL | {} |
+-----------------------------------------------------------------------------------------------------------------------------------------------------+
----

[[delete-composite-database-alias]]
Expand Down
Loading