API Docs for: 1.0.0
Show:

Export Class

Defined in: src\export.js:1

Export the neo4j data to sql or csv

 Tables
     - Nodes
     - Edges
     - NodeProperties
     - EdgeProperties


 1) stream the data into temporary files
 2) make the files downloadable for the client
 3) delete the temporary files


 CREATE TABLE IF NOT EXISTS Node (
 Node_ID INTEGER PRIMARY KEY AUTOINCREMENT,
 tokenType TEXT,
 groupType TEXT
 );

 CREATE TABLE IF NOT EXISTS Relation (
 Relation_ID INTEGER PRIMARY KEY AUTOINCREMENT,
 SourceNode_ID INTEGER,
 TargetNode_ID INTEGER,
 relationType TEXT
 );

 CREATE TABLE IF NOT EXISTS NodeProperties (
 NodeProperties_ID INTEGER PRIMARY KEY AUTOINCREMENT,
 key TEXT,
 value TEXT,
 Node_ID INTEGER
 );

 CREATE TABLE IF NOT EXISTS RelationProperties (
 RelationProperties_ID INTEGER PRIMARY KEY AUTOINCREMENT,
 key TEXT,
 value TEXT
 );

Methods

_get_time

() String

Defined in src\export.js:66

Get the current time as POSIX time as a string

Returns:

String:

_node_properties_to_csv

(
  • write_stream
)
Promise

Defined in src\export.js:392

Writes csv into the given write_stream

Starts with the CSV Table header and then adds all _node_properties_to_csv line by line

Parameters:

  • write_stream WriteStream

Returns:

Promise:

_node_properties_to_sql

(
  • write_stream
)
Promise

Defined in src\export.js:222

Writes sql code into the given write_stream

Starts with the SQL Table creation for node properties and then adds all properties

Parameters:

  • write_stream WriteStream

Returns:

Promise:

_nodes_to_csv

(
  • write_stream
)
Promise

Defined in src\export.js:272

Writes csv into the given write_stream

Starts with the CSV Table header and then adds all nodes line by line

Parameters:

  • write_stream WriteStream

Returns:

Promise:

_nodes_to_sql

(
  • write_stream
)
Promise

Defined in src\export.js:78

Writes sql code into the given write_stream

Starts with the SQL Table creation and then adds all nodes

Parameters:

  • write_stream WriteStream

Returns:

Promise:

_relation_properties_to_csv

(
  • write_stream
)
Promise

Defined in src\export.js:350

Writes csv into the given write_stream

Starts with the CSV Table header and then adds all relation_properties line by line

Parameters:

  • write_stream WriteStream

Returns:

Promise:

_relation_properties_to_sql

(
  • write_stream
)
Promise

Defined in src\export.js:172

Writes sql code into the given write_stream

Starts with the SQL Table creation for relation properties and then adds all properties

Parameters:

  • write_stream WriteStream

Returns:

Promise:

_relations_to_csv

(
  • write_stream
)
Promise

Defined in src\export.js:311

Writes csv into the given write_stream

Starts with the CSV Table header and then adds all relations line by line

Parameters:

  • write_stream WriteStream

Returns:

Promise:

_relations_to_sql

(
  • write_stream
)
Promise

Defined in src\export.js:125

Writes sql code into the given write_stream

Starts with the SQL Table creation for relations and then adds all relations

Parameters:

  • write_stream WriteStream

Returns:

Promise:

to_csv

() Promise

Defined in src\export.js:504

Creates a zipped dir containing four files necessary to reassemble the GraphDB's storage The file is stored in the to_folder of Export

Returns:

Promise:

to_sql

() Promise

Defined in src\export.js:434

Creates a zipped SQL file containing all of the SQL creation and insertion statements for the DB The file is stored in the to_folder of Export

Returns:

Promise:

Properties

to_folder

String

Defined in src\export.js:57

The target folder where the exports are stored

Default: path.join(__dirname, '..', 'media', 'export')