neo4j :: NeoGraph :: defaultinit
# A Neo4j graph with a local identification scheme for its nodes.
#
# An identification scheme can be defined by subclassing `NeoNodeCollection`.
#
# `GraphStore` can be subclassed to add ways to save or load a graph. The
# storing mechanisms may use `nodes.id_of` to identify the nodes in the graph
# while encoding the relationships.
class NeoGraph
# All the nodes in the graph.
var nodes: NeoNodeCollection
# All the relationships in the graph.
var edges: SimpleCollection[NeoEdge] = new Array[NeoEdge]
# Add a new node to the graph and return it.
#
# Set the local ID of the node before returning it.
#
# SEE: `NeoNodeCollection.add`
# SEE: `NeoNodeCollection.create_node`
# SEE: `NeoNodeCollection.register`
fun create_node: NeoNode do return nodes.create_node
end
lib/neo4j/graph/graph.nit:17,1--39,3