Skip to content

Commit 7d35407

Browse files
Document cypher db drop proc
1 parent 69f4e02 commit 7d35407

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

doc/modules/ROOT/pages/management-ops/create-cypher-db.adoc

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[create-cypher-db]]
1+
[[cypher-on-gds]]
22
= Cypher on GDS graph
33
:description: This chapter explains how to execute Cypher queries on named graphs in the Neo4j Graph Data Science library.
44

@@ -23,14 +23,13 @@ That database will then use data from the projected graph as compared to the sto
2323
Although it is possible to execute arbitrary Cypher queries on the database created by the `gds.alpha.create.cypherdb` procedure, not every aspect of Cypher is implemented yet.
2424
Some known limitations are listed below:
2525

26-
* Dropping the newly created database
27-
** Restarting the DBMS will remove the database instead
28-
* Writes
29-
** All queries that attempt to write things, such as nodes, properties or labels, will fail
26+
* Some writes will fail
27+
** Creating new nodes and adding node labels
28+
** Everything related to relationships
3029

3130

3231
[[create-cypher-db-syntax]]
33-
== Syntax
32+
== Create database syntax
3433

3534
[.create-cypher-db-syntax]
3635
--
@@ -157,3 +156,28 @@ MATCH (n:Person)-[:KNOWS]->(m:Person) RETURN n.age AS age1, m.age AS age2
157156
|===
158157

159158
We can see that the returned ages correspond to the structure of the original graph.
159+
160+
161+
[[drop-cypher-db]]
162+
== Dropping a GDS database
163+
164+
As described above, in-memory GDS databases are impermanent and will be removed when the DBMS is shut down.
165+
If we need to drop the GDS database earlier, there are 2 ways to achieve this:
166+
1. Using an administrative cypher command against the system database (`DROP DATABASE <db-name>`)
167+
2. Using the <<drop-cypher-db-procedure-syntax, `gds.alpha.drop.cypherdb`>> procedure
168+
169+
[[drop-cypher-db-procedure-syntax]]
170+
=== Drop database syntax
171+
172+
[.drop-cypher-db-syntax]
173+
--
174+
[source, cypher, role=noplay]
175+
----
176+
CALL gds.alpha.drop.cypherdb(
177+
dbName: String
178+
)
179+
YIELD
180+
dbName: String,
181+
dropMillis: Integer
182+
----
183+
--

doc/modules/ROOT/pages/operations-reference/additional-operation-references.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
| xref:alpha-algorithms/one-hot-encoding.adoc[One Hot Encoding] | `_gds.alpha.ml.oneHotEncoding_`
2323
| xref:common-usage/debug-sysinfo.adoc[Status of the system] | `gds.debug.sysInfo`
2424
| xref:management-ops/create-cypher-db.adoc[Create an impermanent database backed by a projected graph] | `gds.alpha.create.cypherdb`
25+
| xref:management-ops/create-cypher-db.adoc#drop-cypher-db[Drop an impermanent database backed by a projected graph] | `gds.alpha.drop.cypherdb`
2526
| xref:common-usage/monitoring-system.adoc[Get an overview of the system's workload and available resources] | `gds.alpha.systemMonitor`
2627
| xref:management-ops/backup-restore.adoc[Back-up graphs and models to disk] | `gds.alpha.backup`
2728
| xref:management-ops/backup-restore.adoc[Restore persisted graphs and models to memory] | `gds.alpha.restore`

0 commit comments

Comments
 (0)