apoc.export.cypher.schema
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
Syntax |
|
||
Description |
Exports all schema indexes and constraints to Cypher statements. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the file to which the data will be exported. The default is: ``. |
|
|
|
|
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the file to which the data was exported. |
|
|
|
The number of batches the export was run in. |
|
|
|
A summary of the exported data. |
|
|
|
The format the file is exported in. |
|
|
|
The number of exported nodes. |
|
|
|
The number of exported relationships. |
|
|
|
The number of exported properties. |
|
|
|
The duration of the export. |
|
|
|
The number of rows returned. |
|
|
|
The size of the batches the export was run in. |
|
|
|
The executed Cypher Statements. |
|
|
|
The executed node statements. |
|
|
|
The executed relationship statements. |
|
|
|
The executed schema statements. |
|
|
|
The executed cleanup statements. |
Usage Examples
The examples in this section are based on a database that has applied the following constraints:
CREATE CONSTRAINT personName FOR (person:Person)
REQUIRE person.name IS UNIQUE;
CREATE CONSTRAINT userId FOR (user:User)
REQUIRE user.id IS UNIQUE;
CALL apoc.export.cypher.schema()
YIELD format, time, cypherStatements
RETURN format, time, cypherStatements;
format | time | cypherStatements |
---|---|---|
"cypher" |
1 |
":begin CREATE CONSTRAINT FOR (node:Person) REQUIRE (node.name) IS UNIQUE; CREATE CONSTRAINT FOR (node:User) REQUIRE (node.id) IS UNIQUE; :commit CALL db.awaitIndexes(300); " |