-
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 32 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 | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,245 @@ | ||||||
| :description: Information about how to select Cypher version for queries or databases. | ||||||
|
|
||||||
| = Select Cypher version | ||||||
|
|
||||||
| Users can specify the version of Cypher in which they want to run their queries, choosing between Cypher 5 and Cypher 25. | ||||||
| The Cypher version can be specified either by configuring a default language for the database or by setting it on a per-query basis. | ||||||
|
|
||||||
| [[cypher-versions-explained]] | ||||||
| == Cypher 25, Cypher 5, 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). | ||||||
| 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.06*. | ||||||
| It is created as a clone of Cypher 5, but with additional new and updated features, as well as some removed features. | ||||||
| For more information about the new, updated, and removed features included in Cypher 25, see the xref:deprecations-additions-removals-compatibility.adoc#cypher-deprecations-additions-removals-2025.06[Additions, deprecations, removals, and compatibility] page. | ||||||
|
|
||||||
| Cypher 25 is in a evolving state, and more features will be added to it with future releases of Neo4j. | ||||||
| In the releases following Neo4j 2026.06, features will only be added to Cypher 25; no features will be removed until the next Cypher release. | ||||||
| *Any new Cypher features introduced in Neo4j 2025.06 or later will be exclusively added to Cypher 25.* | ||||||
|
|
||||||
| 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 2025.05 release, the release in which Cypher 5 was frozen. | ||||||
| *No new features will be added to Cypher 5.* | ||||||
| For information about Cypher 5, see the link:https://neo4j.com/docs/cypher-manual/5/introduction/[Cypher 5 Manual]. | ||||||
|
|
||||||
| [NOTE] | ||||||
| Although Cypher 5 queries are currently supported on Neo4j 2025.06+ databases, they will eventually need to be migrated to Cypher 25, as support for Cypher 5 will be discontinued in a future release (anticipated no earlier than two additional server LTS cycles). | ||||||
|
|
||||||
| [[select-default-cypher-version]] | ||||||
| == Select the default Cypher version for a database | ||||||
|
|
||||||
| Databases created on, or migrated to, Neo4j 2025.06 or later will continue to have Cypher 5 as their default language (unless {neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`db.query.default_language`] is set to `CYPHER_25`). | ||||||
| This is true for link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases. | ||||||
| However, it is possible to set a different default language on both new and existing system, standard, and composite databases. | ||||||
|
|
||||||
| To select a default Cypher version when creating 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. | ||||||
|
|
||||||
| [NOTE] | ||||||
| Setting the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege]. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only applies for the ALTER DATABASE command. For CREATE DATABASE and CREATE COMPOSITE DATABASE commands only the CREATE DATABASE/CREATE COMPOSITE DATABASE privileges are needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might not need the note at all since it should only say that to create you need privilege to create, which isn't anything new, in difference to that alter case that has new/separate privileges 🤷 |
||||||
|
|
||||||
| .Select default Cypher version when creating a database | ||||||
| [.tabbed-example] | ||||||
| ===== | ||||||
| [.include-with-Cypher-25] | ||||||
| ====== | ||||||
|
|
||||||
| .Cypher 25 | ||||||
| [source,cypher] | ||||||
| ---- | ||||||
| CREATE DATABASE my_new_database DEFAULT LANGUAGE CYPHER 25 | ||||||
| ---- | ||||||
|
|
||||||
| ====== | ||||||
|
|
||||||
| [.include-with-Cypher-5] | ||||||
| ====== | ||||||
|
|
||||||
| .Cypher 5 | ||||||
| [source,cypher] | ||||||
| ---- | ||||||
| CREATE DATABASE my_database DEFAULT LANGUAGE CYPHER 5 | ||||||
| ---- | ||||||
|
|
||||||
| ====== | ||||||
| ===== | ||||||
|
|
||||||
| To alter the default Cypher version on an existing database, add `SET DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/[`ALTER DATABASE`] command. | ||||||
|
|
||||||
| [NOTE] | ||||||
| Altering the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege]. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only applies for standard and system database, for composite databases you'll need the ALTER COMPOSITE DATABASE privilege instead (it doesn't have a lower level privilege like the standard database case does). |
||||||
|
|
||||||
| .Alter the default Cypher version on an existing database | ||||||
| [.tabbed-example] | ||||||
| ===== | ||||||
| [.include-with-Cypher-25] | ||||||
| ====== | ||||||
|
|
||||||
| .Cypher 25 | ||||||
| [source,cypher] | ||||||
| ---- | ||||||
| ALTER DATABASE my_database SET DEFAULT LANGUAGE CYPHER 25 | ||||||
| ---- | ||||||
|
|
||||||
| ====== | ||||||
|
|
||||||
| [.include-with-Cypher-5] | ||||||
| ====== | ||||||
|
|
||||||
| .Cypher 5 | ||||||
| [source,cypher] | ||||||
| ---- | ||||||
| ALTER DATABASE my_new_database SET DEFAULT LANGUAGE CYPHER 5 | ||||||
| ---- | ||||||
|
|
||||||
| ====== | ||||||
| ===== | ||||||
|
|
||||||
| Selecting `CYPHER 25` ensures that all queries run on that database 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). | ||||||
|
||||||
| Selecting `CYPHER 25` ensures that all queries run on that database 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). | |
| Selecting `CYPHER 25` ensures that all queries run on that database 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 xref:selection-query-cypher-version[prepended with `CYPHER 5`], which overrides this default). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, time horizon.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this literally mean that no changes at all will go into Cypher 5 after 25 is out? If one takes this too literally it means no bugfixes or any form of improvement. I'd find clearer a rephrasing along the lines of using the language in its LTS form.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we give a time horizon for when Cypher 5 will be discontinued? Or at least a no earlier than? As we say people are going to have to migrate eventually, it's useful for customers to know by when they need to allocate work to make it happen.