def deleteRemoteSuccTask(self, unique_id: int) -> None: connection = connect() try: with connection.cursor() as cursor: query = f"DELETE FROM {self.table} WHERE successor_id={unique_id}" print(query) cursor.execute(query) connection.commit() finally: connection.close()
def deleteRemoteIssue(self, unique_id: int) -> None: # Delete the remote and local record connection = connect() try: with connection.cursor() as cursor: query = f"DELETE FROM {self.table} WHERE issue_id={unique_id}" print(query) cursor.execute(query) connection.commit() finally: connection.close()
def retreiveWithDeliverable(self, dunique_id: int) -> None: # Populate the class preexsiting values connection = connect() try: with connection.cursor() as cursor: query = f"SELECT * FROM {self.table} WHERE deliverable_id={dunique_id}" print(query) cursor.execute(query) result = cursor.fetchall() finally: connection.close() return result
def retreiveWitSuccTask(self, tunique_id: int) -> None: # Populate the class preexsiting values connection = connect() try: with connection.cursor() as cursor: query = f"SELECT * FROM {self.table} WHERE `successor_id`={tunique_id}" print(query) cursor.execute(query) result = cursor.fetchall() return result finally: connection.close()