def runAutoCommit(self, func, *args, **kwargs):
        old_level = self.dbh.isolation_level
        try:
            if self.inTransaction():
                self.dbh.commit()
            self.dbh.set_isolation_level(psy_ext.ISOLATION_LEVEL_AUTOCOMMIT)
            return func(*args, **kwargs)
        finally:
            self.dbh.set_isolation_level(old_level)

    # resetting the auto increment values of primary keys
Call the given function in auto-commit mode. Needed to execute
dataset/ETHPy150Open sassoftware/conary/conary/dbstore/psycopg2_drv.py/Database.runAutoCommit