(self)
Clear any existing transactions.
Clear any existing transactions.
Clear any existing transactions .
def clear_transaction(self) -> None:
        """Clear any existing transactions."""
        conn = self.get_thread_connection()
        if conn is not None:
            if conn.transaction_open:
                self._rollback(conn)
            self.begin()
            self.commit()
def clear_transaction ( self ) -> None : conn = self . get_thread_connection ( ) if conn is not None : if conn . transaction_open : self . _rollback ( conn ) self . begin ( ) self . commit ( )