(self)
If the named connection exists, commit the current transaction.
If the named connection exists, commit the current transaction.
If the named connection exists commit the current transaction .
def commit_if_has_connection(self) -> None:
        """If the named connection exists, commit the current transaction."""
        connection = self.get_if_exists()
        if connection:
            self.commit()
def commit_if_has_connection ( self ) -> None : connection = self . get_if_exists ( ) if connection : self . commit ( )