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
Update docs to clarify that IF NOT EXISTS check for both databases and database aliases (#2573) (#2576)
catching all graph references and not just within their own category
also fix other minor things I noticed
Co-authored-by: Therese Magnusson <[email protected]>
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/aliases/manage-aliases-standard-databases.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -316,10 +316,10 @@ SHOW ALIAS `northwind` FOR DATABASE
316
316
317
317
The `CREATE ALIAS` command is optionally idempotent, with the default behavior to fail with an error if the database alias already exists.
318
318
To work around this, you can append `IF EXISTS` or `OR REPLACE` to the command.
319
-
Both check for any remote or local database aliases.
319
+
Both check for any remote or local database aliases with the given name, `IF NOT EXISTS` also check for existing databases with the given name.
320
320
321
321
* Appending `IF NOT EXISTS` to the command.
322
-
This ensures that no error is returned and nothing happens should the database alias already exist.
322
+
This ensures that no error is returned and nothing happens should a database or database alias with that name already exist.
323
323
+
324
324
.Query
325
325
[source, cypher]
@@ -328,7 +328,7 @@ CREATE ALIAS `northwind` IF NOT EXISTS FOR DATABASE `northwind-graph-2021`
328
328
----
329
329
330
330
* Appending `OR REPLACE` to the command.
331
-
This means that if the database alias already exists, it will be replaced with the new one.
331
+
This means that if a database alias with that name already exists, it will be replaced with the new one.
332
332
+
333
333
.Query
334
334
[source, cypher]
@@ -417,7 +417,7 @@ FOR DATABASE
417
417
418
418
You can also use `IF EXISTS` or `OR REPLACE` when creating remote database aliases.
419
419
It works the same way as described in the <<_use_if_exists_or_or_replace_when_creating_database_aliases, Use `IF EXISTS` or `OR REPLACE` when creating database aliases>> section.
420
-
Both check for any remote or local database aliases.
420
+
Both check for any remote or local database aliases (with `IF NOT EXISTS` also checking for databases).
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/composite-databases/create-composite-databases.adoc
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
Composite databases are managed using Cypher(R) administrative commands.
8
8
Note that it is not possible to modify access options or database topologies for composite databases as these are inherited from the constituent databases.
9
9
For information about modifying access options, see xref:database-administration/standard-databases/alter-databases.adoc#manage-databases-alter[Alter database access mode].
10
-
For information about about topologies for databases, see xref:clustering/setup/deploy.adoc#cluster-example-create-databases-on-cluster[Create databases in a cluster].
10
+
For information about topologies for databases, see xref:clustering/setup/deploy.adoc#cluster-example-create-databases-on-cluster[Create databases in a cluster].
11
11
12
12
Drivers and client applications connect to composite databases just like standard databases.
13
13
For more information, see the manuals for the different link:{neo4j-docs-base-uri}/create-applications/[Neo4j drivers and applications].
@@ -18,8 +18,8 @@ For more information, see the manuals for the different link:{neo4j-docs-base-ur
18
18
Composite databases can be created using `CREATE COMPOSITE DATABASE`.
19
19
20
20
Composite database names are subject to the same rules as xref:database-administration/standard-databases/naming-databases.adoc[standard databases].
21
-
One difference is however that the deprecated syntax using dots without enclosing the name in backticks is not available.
22
-
Both dots and dashes need to be enclosed within backticks when using composite databases.
21
+
One difference is however that in Cypher 5, the syntax using dots without enclosing the name in backticks is not available.
22
+
Both dots and dashes need to be enclosed within backticks when using composite databases in Cypher 5.
23
23
24
24
[NOTE]
25
25
====
@@ -66,7 +66,7 @@ For information about creating aliases in composite databases, see xref:database
66
66
The `CREATE COMPOSITE DATABASE` command is optionally idempotent, with the default behavior to fail with an error if the database already exists.
67
67
There are two ways to circumvent this behavior.
68
68
69
-
First, appending `IF NOT EXISTS` to the command ensures that no error is returned and nothing happens should the database already exist.
69
+
First, appending `IF NOT EXISTS` to the command ensures that no error is returned and nothing happens should a database or database alias with the given name already exist.
70
70
71
71
.Query
72
72
[source, cypher]
@@ -87,6 +87,7 @@ CREATE OR REPLACE COMPOSITE DATABASE inventory
87
87
This is equivalent to running `DROP DATABASE inventory IF EXISTS` followed by `CREATE COMPOSITE DATABASE inventory`.
88
88
89
89
The behavior of `IF NOT EXISTS` and `OR REPLACE` apply to both standard and composite databases (e.g. a composite database may replace a standard database or another composite database).
90
+
`IF NOT EXISTS` also catches if any database aliases with the given name exists and does nothing instead of throwing an error on existing alias sharing the name.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/standard-databases/create-databases.adoc
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -334,7 +334,7 @@ In this example, all three cluster members have returned `03N85 (Neo.ClientNotif
334
334
The `CREATE DATABASE` command is optionally idempotent, with the default behavior to fail with an error if the database already exists.
335
335
There are two ways to circumvent this behavior.
336
336
337
-
First, appending `IF NOT EXISTS` to the command ensures that no error is returned and that nothing happens if the database already exists.
337
+
First, appending `IF NOT EXISTS` to the command ensures that no error is returned and that nothing happens if a database or database alias with the given name already exist.
338
338
339
339
[source, cypher]
340
340
----
@@ -366,6 +366,7 @@ RETURN createStatement AS statement
366
366
----
367
367
368
368
The behavior of `IF NOT EXISTS` and `OR REPLACE` apply to both standard and composite databases (e.g. a composite database may replace a standard database or another composite database).
369
+
`IF NOT EXISTS` also catches if any database aliases with the given name exists and does nothing instead of throwing an error on existing alias sharing the name.
0 commit comments