-
Notifications
You must be signed in to change notification settings - Fork 64
Select Cypher version #1123
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
Select Cypher version #1123
Changes from 6 commits
8514b29
85f4663
8b25fa4
6a54b9a
e1a6900
b5b82b4
11e8788
5e285b4
fc023a6
360f226
3d5f74f
5b0baa8
1b3f808
7be498c
8d44f62
4b4133b
034101b
b8a9d64
66afae4
b4f0831
2bf10cc
0dfb4b9
6dc83e8
1c72599
9b847b0
096d0d3
40e019d
11b09df
4e1bf7d
d463f0d
2de872d
63d64d4
e5c3eef
ee37101
57907c5
6985f5c
1d4701d
cb1a5f0
0de4ff5
ca45c21
1bdf52d
5e533a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,16 +9,16 @@ The Cypher version can be set for individual queries or as the default language | |
| == Cypher 5, Cypher 25, and Neo4j explained | ||
|
|
||
| Starting in 2025, the Neo4j server transitioned to a calendar-based versioning system. | ||
| This means Neo4j will no longer use its previous semantic versioning and release pattern (e.g., 5.25, 5.26). | ||
| This means Neo4j will no longer use its previous semantic versioning and release pattern (e.g., 5_25, 5.26). | ||
| Instead, releases from 2025 onwards will follow a *YYYY.MM* format, beginning with version 2025.01 released in January 2025, followed by 2025.02 released in February 2025, and so on. | ||
|
|
||
| Cypher 25 is introduced alongside Neo4j 2025.04 and is the default language for newly created databases running version 2025.04 or later. | ||
| However, users running Neo4j version 2025.04 or later can choose to run their queries using the previous version of Cypher: Cypher 5. | ||
| If so, Neo4j will use Cypher as it existed at the time of the Neo4j 5.26 long-term support (LTS) release. | ||
| Cypher 25 is introduced alongside Neo4j 2025.06. | ||
| However, users running Neo4j version 2025.06 or later can choose to run their queries using the previous version of Cypher: Cypher 5. | ||
| If so, Neo4j will use Cypher as it existed at the time of the Neo4j **TBC** release. | ||
|
|
||
| [NOTE] | ||
| Databases migrating to Neo4j 2025.04+ from earlier versions will continue to use Cypher 5 as their default language. | ||
| To change the default language on such databases, see xref:queries/select-version.adoc#alter-default-cypher-version[Alter the default Cypher version for a database]. | ||
| [IMPORTANT] | ||
| All new databases created after the release of 2025.06 will continue to use Cypher 5 as their default language. | ||
| To change the default language, see xref:queries/select-version.adoc#alter-default-cypher-version[Alter the default Cypher version for a database]. | ||
| See also xref:queries/select-version.adoc#config-database-upgrades[Cypher versions, configuration settings, and DBMS upgrades] for information about what default Cypher version is used when upgrading a DBMS. | ||
|
|
||
| For information about updates to Cypher in different Neo4j versions, see xref:deprecations-additions-removals-compatibility.adoc[]. | ||
|
|
@@ -29,10 +29,10 @@ For information about Cypher 5, see the link:https://neo4j.com/docs/cypher-manua | |
|
|
||
| To select the Cypher version of a query, prepend it with `CYPHER <language version>`. | ||
|
|
||
| Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j 5.26 LTS release. | ||
| Any changes introduced after 5.26 will not affect the query. | ||
| Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j **TBC** release. | ||
| Any changes introduced after the **TBC** release will not affect the query. | ||
|
|
||
| Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.04 or later. | ||
| Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later. | ||
|
|
||
| Below are two examples showing the two versions of Cypher behaving differently. | ||
|
|
||
|
|
@@ -115,13 +115,13 @@ For example, if a database is created with Cypher 5 as its default language, pre | |
| === Procedures and functions | ||
|
|
||
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures[Procedures] and xref:functions/index.adoc[functions] (including built-in and link:{neo4j-docs-base-uri}/apoc/current/[APOC]) are tied to a specific Cypher language version. | ||
Hunterness marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Therefore, procedures and functions in Neo4j 2025.04+ and APOC 2025.04+ (both of which have Cypher 25 as their default language) may behave differently depending on what version of Cypher is used. | ||
| Therefore, procedures and functions in Neo4j 2025.06+ and APOC 2025.06+ (both of which have Cypher 25 as their default language) may behave differently depending on what version of Cypher is used. | ||
Hunterness marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| For example, APOC 2025.04 removed Cypher 25 support of the procedure `apoc.create.uuids()`, meaning it is not available to queries running Cypher 25. | ||
| However, it can still be used on APOC 2025.04 if queries are prepended with `CYPHER 5`, or if the database’s default version is set to `CYPHER 5`. | ||
| In this case, Neo4j will use APOC and Cypher as they existed at the time of the 5.26 LTS release. | ||
| For example, APOC 2025.06 removed Cypher 25 support of the procedure `apoc.create.uuids()`, meaning it is not available to queries running Cypher 25. | ||
| However, it can still be used on APOC 2025.06 if queries are prepended with `CYPHER 5`, or if the database’s default version is set to `CYPHER 5`. | ||
| In this case, Neo4j will use APOC and Cypher as they existed at the time of the **TBC** release. | ||
|
|
||
| .Using a procedure removed in Cypher 25 with APOC 2025.04+ | ||
| .Using a procedure removed in Cypher 25 with APOC 2025.06+ | ||
| [source, cypher] | ||
| ---- | ||
| CYPHER 5 | ||
|
|
@@ -145,22 +145,22 @@ RETURN n.name | |
| [[select-default-cypher-version]] | ||
| == Select the default Cypher version when creating a database | ||
|
|
||
| Databases created on Neo4j 2025.04 or later will have Cypher 25 as their default language (if {neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`config_db.query.default_language`] is set to `CYPHER_25` -- see xref:queries/select-version.adoc#config-database-upgrades[Cypher versions, configuration settings, and DBMS upgrades] below). | ||
| This is true for the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases. | ||
| Databases created on Neo4j 2025.06 or later will continue to have Cypher 5 as their default language (if {neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`config_db.query.default_language`] is set to `CYPHER 5` -- see xref:queries/select-version.adoc#config-database-upgrades[Cypher versions, configuration settings, and DBMS upgrades] below). | ||
Hunterness marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| This is true for link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases. | ||
|
|
||
| To select a different default Cypher version for a database, add `DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/[`CREATE DATABASE`] statement. | ||
| This can be done on any Neo4j database. | ||
|
|
||
| Selecting `CYPHER 5` as the default database language ensures that every query run on that database uses the language as it existed at the time of the Neo4j 5.26 LTS release (unless a query is prepended with `CYPHER 25`, which overrides this default). | ||
| Any changes introduced after 5.26 will not affect the semantics of the query. | ||
| Selecting `CYPHER 5` as the default database language ensures that every query run on that database uses the language as it existed at the time of the Neo4j **TBC** release (unless a query is prepended with `CYPHER 25`, which overrides this default). | ||
|
||
| Any changes introduced after the **TBC** release will not affect the semantics of the query. | ||
|
|
||
| .Create a database with Cypher 5 as the default language | ||
| [source, cypher] | ||
| ---- | ||
| CREATE DATABASE my_database DEFAULT LANGUAGE CYPHER 5 | ||
|
||
| ---- | ||
|
|
||
| Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.04 or later (unless a query is prepended with `CYPHER 5`, which overrides this default). | ||
| Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later (unless a query is prepended with `CYPHER 5`, which overrides this default). | ||
|
|
||
| .Create a database with Cypher 25 as the default language | ||
| [source, cypher] | ||
|
|
@@ -230,22 +230,22 @@ The table below outlines which Cypher version is assigned to databases in differ | |
| |=== | ||
| | Scenario | `db.query.default_language` | Databases | ||
|
|
||
| | *Standard DBMS upgrade to Neo4j 2025.04+* | ||
| | *Standard DBMS upgrade to Neo4j 2025.06+* | ||
| | Unset | ||
Hunterness marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | *Existing system database:* `CYPHER 5` + | ||
| *Existing user databases:* `CYPHER 5` + | ||
| *New user databases default:* `CYPHER 5` | ||
| | *Existing system database:* `CYPHER_5` + | ||
| *Existing user databases:* `CYPHER_5` + | ||
| *New user databases default:* `CYPHER_5` | ||
Hunterness marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| | *Custom DBMS upgrade to Neo4j 2025.04+* | ||
| | *Custom DBMS upgrade to Neo4j 2025.06+* | ||
| | Manually set to `CYPHER_25` by administrator | ||
| | *Existing system database:* `CYPHER 5` + | ||
| *Existing user databases:* `CYPHER 5` + | ||
| *New user databases default:* `CYPHER 25` | ||
|
|
||
| | *New installation of Neo4j 2025.04+* | ||
| | Set to `CYPHER_25` | ||
| | *New system database:* `CYPHER 25` + | ||
| *New user databases default:* `CYPHER 25` | ||
| | *Existing system database:* `CYPHER_5` + | ||
| *Existing user databases:* `CYPHER_5` + | ||
| *New user databases default:* `CYPHER_25` | ||
|
|
||
| | *New installation of Neo4j 2025.06+* | ||
| | Set to `CYPHER_5` | ||
| | *New system database:* `CYPHER_5` + | ||
| *New user databases default:* `CYPHER_5` | ||
|
|
||
| |=== | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.