def commit(self, cursor=None, close=1):
        if cursor and cursor.description:
            self.headers = cursor.description
            self.results = cursor.fetchall()
            if hasattr(cursor, "nextset"):
                s = cursor.nextset()
                while s:
                    self.results += cursor.fetchall()
                    s = cursor.nextset()
        if hasattr(cursor, "lastrowid"):
            self.lastrowid = cursor.lastrowid
        if hasattr(cursor, "updatecount"):
            self.updatecount = cursor.updatecount
        if not self.autocommit or cursor is None:
            if not self.db.autocommit:
                self.db.commit()
        if cursor and close: cursor.close()
commit the cursor and create the result set
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/dbexts.py/dbexts.commit