Skip to content

Commit 1dbf83f

Browse files
mnd999Hunterness
authored andcommitted
WIP default language docs
1 parent ca3bb15 commit 1dbf83f

File tree

5 files changed

+36
-6
lines changed

5 files changed

+36
-6
lines changed

modules/ROOT/pages/database-administration/composite-databases/create-composite-databases.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ The behavior of `IF NOT EXISTS` and `OR REPLACE` apply to both standard and comp
9393
The `IF NOT EXISTS` and `OR REPLACE` parts of these commands cannot be used together.
9494
====
9595

96+
[[composite-databases-default-language]]
97+
=== Create composite databases with `DEFAULT LANGUAGE`
98+
The `CREATE COMPOSITE DATABASE` command can be used to set the default Cypher version when creating a composite database.
99+
100+
.Query
101+
[source, cypher]
102+
----
103+
CREATE COMPOSITE DATABASE inventory DEFAULT LANGUAGE CYPHER 5
104+
----
105+
106+
For more information see link:{neo4j-docs-base-uri}/cypher-manual/current/queries/select-version/#select-default-cypher-version[Cypher Manual -> Queries -> Select Cypher version].
107+
96108
[[composite-databases-stop]]
97109
== Stop composite databases
98110

modules/ROOT/pages/database-administration/standard-databases/alter-databases.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
:description: how to modify standard databases in Neo4j using the Cypher command `ALTER DATABASE`.
2-
[role=enterprise-edition not-on-aura]
32
[[administration-databases-alter-database]]
43
= Alter databases
54

@@ -38,6 +37,7 @@ There can be multiple `SET OPTION` or `REMOVE OPTION` clauses for different opti
3837
====
3938
|===
4039

40+
[role=enterprise-edition not-on-aura]
4141
[[manage-databases-alter]]
4242
== Alter database access mode
4343

@@ -102,11 +102,13 @@ SET ACCESS READ WRITE
102102
The `ALTER DATABASE` command can be used to set the default Cypher version for a database.
103103
For more information see link:{neo4j-docs-base-uri}/cypher-manual/current/queries/select-version/#alter-default-cypher-version[Cypher Manual -> Queries -> Select Cypher version].
104104

105+
[role=enterprise-edition not-on-aura]
105106
== Alter database topology
106107

107108
In a cluster environment, you can use the `ALTER DATABASE` command to change the number of servers hosting a database.
108109
For more information, see xref::clustering/databases.adoc#alter-topology[Managing databases in a cluster].
109110

111+
[role=enterprise-edition not-on-aura]
110112
[[alter-database-options]]
111113
== `ALTER DATABASE` options
112114

modules/ROOT/pages/database-administration/standard-databases/configuration-parameters.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ Example configuration:
9393
----
9494
server.databases.writable=["foo", "bar"]
9595
----
96+
| xref:configuration/configuration-settings.adoc#config_db.query.default_language[`db.query.default_language`]
97+
a|
98+
The default query language version used for newly created databases where not specified as part of `CREATE` or `ALTER` database. This will also be used for `system` and `neo4j` databases when a new DBMS is started.
99+
100+
Example configuration:
101+
[source, example, role="noheader"]
102+
----
103+
db.query.default_language=CYPHER_5
104+
----
96105
|===
97106

98107
[NOTE]

modules/ROOT/pages/database-administration/standard-databases/listing-databases.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ For other database states the value will be `NULL`.
193193
|The names of any constituents the database may have. Applicable only for composite databases. label:default-output[]
194194
| LIST<STRING>
195195

196+
|defaultLanguage
197+
|The default query language for this database.
198+
Queries that are not prefixed with a query language version will default to executing with theis version of Cypher.
199+
|STRING
200+
196201
|options
197202
|The map of options applied to the database.
198203
| MAP
@@ -308,11 +313,11 @@ SHOW DATABASE movies YIELD *
308313
.Result
309314
[role="queryresult"]
310315
----
311-
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
312-
| name | type | aliases | access | databaseID | serverID | address | role | writer | requestedStatus | currentStatus | statusMessage | default | home | currentPrimariesCount | currentSecondariesCount | requestedPrimariesCount | requestedSecondariesCount | creationTime | lastStartTime | lastStopTime | store | lastCommittedTxn | replicationLag | constituents | options |
313-
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
314-
| "movies" | "standard" | ["films", "motion pictures"] | "read-write" | "C066801F54B44EA1520F0FE392B4005AABF42D8DD0A5FD09969B955575D287D5" | "e3063985-e2f4-4728-824b-a7d53779667a" | "localhost:7687" | "primary" | TRUE | "online" | "online" | "" | FALSE | FALSE | 1 | 0 | 1 | 0 | 2023-08-14T10:01:29.074Z | 2023-08-14T10:01:29.074Z | NULL | "record-aligned-1.1" | 3 | 0 | [] | {} |
315-
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
316+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
317+
| name | type | aliases | access | databaseID | serverID | address | role | writer | requestedStatus | currentStatus | statusMessage | default | home | currentPrimariesCount | currentSecondariesCount | requestedPrimariesCount | requestedSecondariesCount | creationTime | lastStartTime | lastStopTime | store | lastCommittedTxn | replicationLag | constituents | defaultLanguage | options |
318+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
319+
| "movies" | "standard" | ["films", "motion pictures"] | "read-write" | "C066801F54B44EA1520F0FE392B4005AABF42D8DD0A5FD09969B955575D287D5" | "e3063985-e2f4-4728-824b-a7d53779667a" | "localhost:7687" | "primary" | TRUE | "online" | "online" | "" | FALSE | FALSE | 1 | 0 | 1 | 0 | 2023-08-14T10:01:29.074Z | 2023-08-14T10:01:29.074Z | NULL | "record-aligned-1.1" | 3 | 0 | [] | "CYPHER 5" | {} |
320+
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
316321
----
317322

318323
== Show the number of databases

modules/ROOT/pages/database-administration/syntax.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ YIELD { * \| field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]
118118
[source, syntax, role="noheader"]
119119
----
120120
CREATE DATABASE name [IF NOT EXISTS]
121+
[DEFAULT LANGUAGE CYPHER {5\|25}]
121122
[TOPOLOGY n PRIMAR{Y\|IES} [m SECONDAR{Y\|IES}]]
122123
[OPTIONS "{" option: value[, ...] "}"]
123124
[WAIT [n [SEC[OND[S]]]]\|NOWAIT]
@@ -197,6 +198,7 @@ CREATE OR REPLACE COMPOSITE DATABASE name
197198
ALTER DATABASE name [IF EXISTS]
198199
{
199200
SET ACCESS {READ ONLY \| READ WRITE} \|
201+
SET DEFAULT LANGUAGE CYPHER {5\|25} \|
200202
SET TOPOLOGY n PRIMAR{Y\|IES} [m SECONDAR{Y\|IES}] \|
201203
SET OPTION option value
202204
}

0 commit comments

Comments
 (0)