neuroarch
latest
  • Introduction
  • Installation
  • Reference
    • Object Graph Mapping
    • High Level API
      • NeuroArch Class
        • NeuroArch
        • Methods for Connection
        • Methods for Queries
        • Methods for Loading Biological Entities
        • Auxilliary Methods
      • High Level Query Functions
      • Auxilliary Functions
      • Exceptions and Warnings
    • Low Level API for Query
    • Support Classes and Functions
  • Authors & Acknowledgements
  • License
neuroarch
  • Reference
  • High Level API
  • neuroarch.na.NeuroArch.link_with_batch
  • Edit on GitHub

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

Previous Next

© Copyright 2021, Lev E. Givon, Nikul H. Ukani, Yiyin Zhou. Revision 1126f438.

Built with Sphinx using a theme provided by Read the Docs.