Interface: Neo4jRecord

Neo4jRecord

The data will be formatted as follow:


{
nodes: [
{
id: *int*,
labels: [ *string* ],
properties: { key: *string* }
}, {...}
],
relationships: [
{
id: *int*,
start_node: *node.id*,
end_node: *node.id*,
type: *string*,
properties: { key: *string* }
}, {...}
]
}

Implements:
Source:

Methods

addNode(id, labels, properties) → {Neo4jNode}

Create a new node.
Parameters:
Name Type Description
id number Node identifier.
labels Array.<String> Labels to set on the node.
properties object Properties to set on the node.
Source:
Returns:
The created Neo4jNode.
Type
Neo4jNode

addNode(labels, properties) → {Neo4jNode}

Create a new node with an automatically generated identifier.
Parameters:
Name Type Description
labels Array.<String> Labels to set on the node.
properties object Properties to set on the node.
Source:
Returns:
The created Neo4jNode.
Type
Neo4jNode

addRelationship(start, end, type, properties)

Create a new relationship between two nodes with an automatically generated identifier.
Parameters:
Name Type Description
start Neo4jNode The first node.
end Neo4jNode The end node.
type string Type of the relationship .
properties object Properties to apply on the relationship.
Source:

addRelationship(id, start, end, type, properties)

Create a new relationship between two nodes.
Parameters:
Name Type Description
id number Relationship identifier.
start Neo4jNode The first node.
end Neo4jNode The end node.
type string Type of the relationship .
properties object Properties to apply on the relationship.
Source:

toJson() → {string}

Transform the DBRecord to a compatible Json representation.
Implements:
Source:
Returns:
The representation as String.
Type
string