-
Notifications
You must be signed in to change notification settings - Fork 60
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
base: cypher-25
Are you sure you want to change the base?
Select Cypher version #1123
Conversation
…cs-cypher into select_version
…cs-cypher into select_version
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.
Should not be a surprise that I have several comments XD
.Create a database with Cypher 5 as the default language | ||
[source, cypher] | ||
---- | ||
CREATE DATABASE my_database DEFAULT LANGUAGE CYPHER 5 |
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.
I have linked back to these sections from the operations manual documentation of these commands. There doesn't seem much point documenting it twice.
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.
I think all sections related to database administration should go to the Operations manual, and here, we can add just one link.
*Existing user databases:* `CYPHER 5` + | ||
*New user databases default:* `CYPHER 5` |
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.
Do we want to add something like this for the remote alias case I mentioned on slack (in addition to having a short sentence about it somewhere as we discussed)
*Existing user databases:* `CYPHER 5` + | |
*New user databases default:* `CYPHER 5` | |
*Existing user databases:* `CYPHER 5` + | |
*Existing non-constituent remote database aliases:* `CYPHER 5` + | |
*New user databases and non-constituent remote database aliases default:* `CYPHER 5` |
(if yes, then we should also update the other two rows in the table)
…cs-cypher into select_version
|
||
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). |
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.
this bit seems more odd when considering CYPHER 5 is the default, it feels more like it's pointing out a difference to the default (probably due to being added to do just that before :P)
This PR includes documentation updates New pages: Updated pages: |
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). |
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.
====== | ||
===== | ||
|
||
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). |
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.
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). |
To select the Cypher version of a query, prepend it with `CYPHER <language version>`. | ||
This selection will override the default language for the database the query is executed against, and allows you to either work with Cypher 25 features in a database that has Cypher 5 as the default language, or to continue running your Cypher 5 queries on a database that has Cypher 25 as the default language. | ||
|
||
Queries run with Cypher 5 will eventually need to be updated to Cypher 25 as support for Cypher 5 will be discontinued in the future (anticipated no earlier than two additional server LTS cycles). |
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.
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. | ||
|
||
Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j 2025.05 release. | ||
Any changes introduced after the 2025.05 release will not affect the query. |
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
.
|
||
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 2025.05 release. |
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.
Operations manual PRs mentioned in this PR:
TODO: Add clarifying note on Additions page