src/pybel/manager/cache_manager.py
def query_singleton_edges_from_network(self, network: Network) -> sqlalchemy.orm.query.Query:
        """Return a query selecting all edge ids that only belong to the given network."""
        ne1 = aliased(network_edge, name='ne1')
        ne2 = aliased(network_edge, name='ne2')
        singleton_edge_ids_for_network = (
            self.session
                .query(ne1.c.edge_id)
                .outerjoin(
                    ne2, and_(
                        ne1.c.edge_id == ne2.c.edge_id,
                        ne1.c.network_id != ne2.c.network_id,
                    ),
                )
                .filter(  # noqa: E131
                    and_(
                        ne1.c.network_id == network.id,
                        ne2.c.edge_id == None,  # noqa: E711
                    ),
                )
        )
        return singleton_edge_ids_for_network
Return a query selecting all edge ids that only belong to the given network.
Return a query selecting all edge ids that only belong to the given network.
Return a query selecting all edge ids that only belong to the given network .
def query_singleton_edges_from_network(self, network: Network) -> sqlalchemy.orm.query.Query:
        ne1 = aliased(network_edge, name='ne1')
        ne2 = aliased(network_edge, name='ne2')
        singleton_edge_ids_for_network = (
            self.session
                .query(ne1.c.edge_id)
                .outerjoin(
                    ne2, and_(
                        ne1.c.edge_id == ne2.c.edge_id,
                        ne1.c.network_id != ne2.c.network_id,
                    ),
                )
                .filter(  
                    and_(
                        ne1.c.network_id == network.id,
                        ne2.c.edge_id == None,  
                    ),
                )
        )
        return singleton_edge_ids_for_network
def query_singleton_edges_from_network ( self , network : Network ) -> sqlalchemy . orm . query . Query : ne1 = aliased ( network_edge , name = 'ne1' ) ne2 = aliased ( network_edge , name = 'ne2' ) singleton_edge_ids_for_network = ( self . session . query ( ne1 . c . edge_id ) . outerjoin ( ne2 , and_ ( ne1 . c . edge_id == ne2 . c . edge_id , ne1 . c . network_id != ne2 . c . network_id , ) , ) . filter ( and_ ( ne1 . c . network_id == network . id , ne2 . c . edge_id == None , ) , ) ) return singleton_edge_ids_for_network
Return a query selecting all edge ids that only belong to the given network.
Return a query selecting all edge ids that only belong to the given network .
"""Return a query selecting all edge ids that only belong to the given network.""" # noqa: E131 # noqa: E711
self
network
Network