neuroarch.na.NeuroArch.link_with_batch
- NeuroArch.link_with_batch(batch, node1, node2, edge_type, **attr)[source]
To create an edge between node1 and node2 with specified edge type, when node1 and node2 are to be created in batch.
- Parameters:
batch (pyorient.ogm.batch.Batch) – A batch object.
node1 (models.Node or subclass) – The node where the edge starts from.
node2 (models.Node or subclass) – The node where the edge ends with.
edge_type (str (optional)) – The name of the type of the edge (relation). If edge_type not given, infer from the types of nodes.
attr (dict (optional)) – Attributes of the edge.
- Returns:
edge – The created edge.
- Return type:
models.Relationship or subclass