def _outV(self): """Returns the outgoing vertex ID of the edge.""" #return int(self._data['_outV']) _outV = self._data.get('_outV') if _outV is None and hasattr(self, "__outV"): _outV = self.__outV return utils.coerce_id(_outV)
def _outV(self): """Returns the outgoing vertex ID of the edge.""" #return int(self._data['_outV']) _outV = self._data.get('_outV') if _outV is None and hasattr(self,"__outV"): _outV = self.__outV return utils.coerce_id(_outV)
def _inV(self): """Returns the incoming vertex ID of the edge.""" #return int(self._data['_inV']) #return utils.coerce_id(self._data['_inV']) _inV = self._data.get('_inV') if _inV is None and hasattr(self, "__inV"): _inV = self.__inV return utils.coerce_id(_inV)
def _inV(self): """Returns the incoming vertex ID of the edge.""" #return int(self._data['_inV']) #return utils.coerce_id(self._data['_inV']) _inV = self._data.get('_inV') if _inV is None and hasattr(self,"__inV"): _inV = self.__inV return utils.coerce_id(_inV)
def _coerce_vertex_id(self, v): """Returns the vertex ID coerced into an int if need be.""" # param v is either a Vertex object or a vertex ID. # the vertex ID may have been passed in as a string if isinstance(v, Vertex): vertex_id = v._id else: # using corece_id to support linked-data URI IDs vertex_id = coerce_id(v) return vertex_id
def _coerce_vertex_id(self,v): """Returns the vertex ID coerced into an int if need be.""" # param v is either a Vertex object or a vertex ID. # the vertex ID may have been passed in as a string if isinstance(v,Vertex): vertex_id = v._id else: # using corece_id to support linked-data URI IDs vertex_id = coerce_id(v) return vertex_id
def _id(self): """ Returns the element ID. This is the element's "primary key"; however, some DBs (such as neo4j) reuse IDs if they are deleted so be careful with how you use them. If you want to guarantee they are unique across the DB's lifetime either don't physically delete elements and just set a deleted flag, or use some other mechanism, such as an external sequence or a hash. """ #int(self._data['_id']) return utils.coerce_id(self._data['_id'])
def _coerce_vertex_id(self, v): """ Returns the vertex ID coerced into an int if need be. :param v: Either a Vertex object or a vertex ID. """ if isinstance(v, Vertex): vertex_id = v._id else: # the vertex ID may have been passed in as a string #vertex_id = int(v) vertex_id = utils.coerce_id(v) return vertex_id
def _coerce_vertex_id(self,v): """ Returns the vertex ID coerced into an int if need be. :param v: Either a Vertex object or a vertex ID. """ if isinstance(v,Vertex): vertex_id = v._id else: # the vertex ID may have been passed in as a string #vertex_id = int(v) vertex_id = utils.coerce_id(v) return vertex_id
def _inV(self): """Returns the incoming vertex ID of the edge.""" #return int(self._data['_inV']) return utils.coerce_id(self._data['_inV'])
def _outV(self): """Returns the outgoing vertex ID of the edge.""" #return int(self._data['_outV']) return utils.coerce_id(self._data['_outV'])