|
341 | 341 | label:functionality[] |
342 | 342 | label:new[] |
343 | 343 |
|
| 344 | +[source, cypher, role="noheader"] |
| 345 | +---- |
| 346 | +CREATE [COMPOSITE] DATABASE actors SET DEFAULT LANGUAGE CYPHER 25 |
| 347 | +---- |
| 348 | + |
| 349 | +a| Set the default Cypher version for a standard or composite database when creating it. |
| 350 | +The available versions are `CYPHER 25` and `CYPHER 5`. |
| 351 | +If not specified, the default language for the database is set to the default language of the DBMS. |
| 352 | +For more information, see the following sections in the Operations Manual: |
| 353 | + |
| 354 | +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database]. |
| 355 | +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set the default Cypher version for a composite database]. |
| 356 | + |
| 357 | +a| |
| 358 | +label:functionality[] |
| 359 | +label:new[] |
| 360 | + |
| 361 | +[source, cypher, role="noheader"] |
| 362 | +---- |
| 363 | +CREATE ALIAS `remote-with-default-language` |
| 364 | +FOR DATABASE `northwind-graph-2020` |
| 365 | + AT "neo4j+s://location:7687" |
| 366 | + USER alice |
| 367 | + PASSWORD 'example_secret' |
| 368 | + DEFAULT LANGUAGE CYPHER 25 |
| 369 | +---- |
| 370 | + |
| 371 | +a| Set the default Cypher version for a remote database alias when creating it. |
| 372 | +The available versions are `CYPHER 5` and `CYPHER 25`. |
| 373 | +Local database aliases and database aliases in composite databases cannot be assigned a default Cypher version. |
| 374 | +Local database aliases always have the Cypher version of their target database and database aliases in composite databases always have the Cypher version of the composite database they belong to. |
| 375 | +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#_set_a_default_cypher_version_for_remote_database_aliases[Operations Manual -> Set a default Cypher version for remote database aliases]. |
| 376 | + |
| 377 | +a| |
| 378 | +label:functionality[] |
| 379 | +label:new[] |
| 380 | +[source, cypher, role="noheader"] |
| 381 | +---- |
| 382 | +ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25 |
| 383 | +---- |
| 384 | + |
| 385 | +a| Alter the default Cypher version of an existing standard or composite database. |
| 386 | +The available versions are `CYPHER 25` and `CYPHER 5`. |
| 387 | +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/#alter-database-default-language[Operations Manual -> Alter the default Cypher version of an existing database]. |
| 388 | + |
| 389 | +a| |
| 390 | +label:functionality[] |
| 391 | +label:new[] |
| 392 | + |
| 393 | +[source, cypher, role="noheader"] |
| 394 | +---- |
| 395 | +ALTER ALIAS `remote-with-default-language` SET DATABASE DEFAULT LANGUAGE CYPHER 25 |
| 396 | +---- |
| 397 | + |
| 398 | +a| Alter the default Cypher version of a remote database alias. |
| 399 | +The available versions are `CYPHER 25` and `CYPHER 5`. |
| 400 | +It is not possible to alter the default Cypher version of a local database alias or an alias belonging to a composite database. |
| 401 | +Local database aliases always have the Cypher version of their target database and aliases belonging to composite databases always have the Cypher version of the composite database. |
| 402 | +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#alter-default-language-remote-database-alias[Operations Manual -> Alter the default Cypher version of a remote database alias]. |
| 403 | + |
| 404 | +a| |
| 405 | +label:functionality[] |
| 406 | +label:new[] |
| 407 | + |
| 408 | +[source, cypher, role="noheader"] |
| 409 | +---- |
| 410 | +SHOW DATABASES YIELD name, defaultLanguage |
| 411 | +---- |
| 412 | + |
| 413 | +a| The new return column `defaultLanguage` for the `SHOW DATABASE` command returns the default language of a database. |
| 414 | +This column is not returned by default; it can only be returned using `YIELD`. |
| 415 | +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_the_default_cypher_version_of_a_database[Operations Manual -> Show the default Cypher version of a database]. |
| 416 | + |
| 417 | +a| |
| 418 | +label:functionality[] |
| 419 | +label:new[] |
| 420 | + |
| 421 | +[source, cypher, role="noheader"] |
| 422 | +---- |
| 423 | +SHOW ALIAS `remote-with-default-language` FOR DATABASE YIELD name, defaultLanguage |
| 424 | +---- |
| 425 | + |
| 426 | +a| The new return column `defaultLanguage` for the `SHOW ALIAS` command returns the default language of a database alias. |
| 427 | +This column is not returned by default; it can only be returned using `YIELD`. |
| 428 | +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#manage-aliases-list[Operations Manual -> List database aliases]. |
| 429 | + |
| 430 | +a| |
| 431 | +label:functionality[] |
| 432 | +label:new[] |
| 433 | + |
| 434 | +[source, cypher, role="noheader"] |
| 435 | +---- |
| 436 | +CYPHER 25 |
| 437 | +MATCH (n:Person) |
| 438 | +FILTER n.age < 35 |
| 439 | +RETURN n.name AS name |
| 440 | +---- |
| 441 | + |
| 442 | +a| New query option: `CYPHER 25`. |
| 443 | +Prepending a query with `CYPHER 25` ensures that a query is run with Cypher 25, regardless of the default language of a database. |
| 444 | +(The ability to select `CYPHER 5` was introduced in Neo4j 5.21). |
| 445 | + |
| 446 | +a| |
| 447 | +label:functionality[] |
| 448 | +label:new[] |
| 449 | + |
344 | 450 | [source, cypher, role="noheader"] |
345 | 451 | ---- |
346 | 452 | RETURN 1 AS a |
|
0 commit comments