def dec_degree(self, vert_str):
Decrements the degree of a vertex.
cur = self.conn.cursor()
cur.execute("UPDATE vertices SET degree=degree-1 WHERE id=?", (vert_str,))
res = cur.rowcount > 0
self.conn.commit()cur.close()
return res
def add_raw(self, edge, timestamp):
Auxiliary function for add to call from inside a transaction.
After Change
self.close_cursor(cur, local=True, commit=True)
return res
def dec_degree(self, vert_str):
Decrements the degree of a vertex.
cur = self.open_cursor()
cur.execute("UPDATE vertices SET degree=degree-1 WHERE id=?", (vert_str,))
res = cur.rowcount > 0
self.close_cursor(cur, local=True, commit=True)
return res
def add_raw(self, edge, timestamp):
Auxiliary function for add to call from inside a transaction.