You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/queries/select-version.adoc
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,12 @@ Instead, releases from 2025 onwards will follow a *YYYY.MM* format, beginning wi
14
14
15
15
Cypher 25 is introduced alongside Neo4j 2025.03 and is the default language for newly created databases running version 2025.03 or later.
16
16
However, users running Neo4j version 2025.03 or later can choose to run their queries using the previous version of Cypher: Cypher 5.
17
-
If so, Neo4j will use Cypher as it existed at the time of the Neo4j 5.26 long-term support release.
17
+
If so, Neo4j will use Cypher as it existed at the time of the Neo4j 5.26 long-term support (LTS) release.
18
18
19
19
[NOTE]
20
20
Databases migrating to Neo4j 2025.03+ from earlier versions will continue to use Cypher 5 as their default language.
21
21
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].
22
-
See also xref:queries/select-version.adoc#config-database-upgrades[Cypher versions, configuration settings, and system upgrades] for information about what default Cypher version is used when upgrading a system.
23
-
22
+
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.
24
23
25
24
For information about updates to Cypher in different Neo4j versions, see xref:deprecations-additions-removals-compatibility.adoc[].
26
25
For information about Cypher 5, see the link:https://neo4j.com/docs/cypher-manual/5/introduction/[Cypher 5 Manual].
@@ -30,7 +29,7 @@ For information about Cypher 5, see the link:https://neo4j.com/docs/cypher-manua
30
29
31
30
To select the Cypher version of a query, prepend it with `CYPHER <language version>`.
32
31
33
-
Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j 5.26 long-term support release.
32
+
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.
34
33
Any changes introduced after 5.26 will not affect the query.
35
34
36
35
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.03 or later.
@@ -120,7 +119,7 @@ Therefore, procedures and functions in Neo4j 2025.03+ and APOC 2025.03+ (both of
120
119
121
120
For example, APOC 2025.03 removed Cypher 25 support of the procedure `apoc.create.uuids()`, meaning it is not available to queries running Cypher 25.
122
121
However, it can still be used on APOC 2025.03 if queries are prepended with `CYPHER 5`, or if the database’s default version is set to `CYPHER 5`.
123
-
In this case, Neo4j will use APOC and Cypher as they existed at the time of the 5.26 long-term support (LTS) release.
122
+
In this case, Neo4j will use APOC and Cypher as they existed at the time of the 5.26 LTS release.
124
123
125
124
.Using a procedure removed in Cypher 25 with APOC 2025.03+
126
125
[source, cypher]
@@ -146,16 +145,13 @@ RETURN n.name
146
145
[[select-default-cypher-version]]
147
146
== Select the default Cypher version when creating a database
148
147
149
-
Databases created on Neo4j 2025.03 or later will have Cypher 25 as their default language.
148
+
Databases created on Neo4j 2025.03 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).
150
149
This is true for the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases.
151
150
152
151
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.
153
152
This can be done on any Neo4j database.
154
153
155
-
[NOTE]
156
-
Selecting a default Cypher version on a database requires the `SET DEFAULT LANGUAGE` privilege.
157
-
158
-
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 long-term support release.
154
+
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).
159
155
Any changes introduced after 5.26 will not affect the semantics of the query.
160
156
161
157
.Create a database with Cypher 5 as the default language
@@ -164,7 +160,7 @@ Any changes introduced after 5.26 will not affect the semantics of the query.
164
160
CREATE DATABASE my_database DEFAULT LANGUAGE CYPHER 5
165
161
----
166
162
167
-
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.03 or later.
163
+
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.03 or later (unless a query is prepended with `CYPHER 5`, which overrides this default).
168
164
169
165
.Create a database with Cypher 25 as the default language
To alter the default Cypher version on a 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.
179
175
180
176
[NOTE]
181
-
Selecting a default Cypher version on a database requires the `SET DEFAULT LANGUAGE` privilege.
177
+
Selecting a default Cypher version on a database requires the `SET DATABASE DEFAULT LANGUAGE` privilege.
182
178
183
179
.Set Cypher 5 as the default language on an existing database
184
180
[source, cypher]
@@ -203,6 +199,11 @@ The Cypher version of a database can be seen using the link:{neo4j-docs-base-uri
203
199
SHOW DATABASES YIELD name, defaultLanguage
204
200
----
205
201
202
+
[NOTE]
203
+
`defaultLanguage` is not returned by default.
204
+
It can only be returned with `YIELD`.
205
+
For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_databases_output[Operations Manual -> `SHOW DATABASES` output].
@@ -216,11 +217,11 @@ SHOW DATABASES YIELD name, defaultLanguage
216
217
|===
217
218
218
219
[[config-database-upgrades]]
219
-
== Cypher versions, configuration settings, and system upgrades
220
+
== Cypher versions, configuration settings, and DBMS upgrades
220
221
221
-
Changing the Cypher version of a database can also be done with the setting link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`config_db.query.default_language`].
222
+
Changing the Cypher version of new databases can also be done with the setting link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`config_db.query.default_language`].
222
223
This setting determines the default language for new databases where it has not been specified as part of a `CREATE` or `ALTER` database command.
223
-
For example, `config_db.query.default_language=CYPHER_25` will set Cypher 25 as the default language for a system.
224
+
For example, `config_db.query.default_language=CYPHER_25` will set Cypher 25 as the default language for a DBMS.
224
225
For more information about using configuration settings, see the link:{neo4j-docs-base-uri}/operations-manual/current/configuration/[Operations Manual -> Configuration].
225
226
226
227
The table below outlines which Cypher version is assigned to databases in different upgrade or installation scenarios:
@@ -229,21 +230,21 @@ The table below outlines which Cypher version is assigned to databases in differ
0 commit comments