def gen_fetchall(self, sql: str, *args) -> Iterator[Sequence[Any]]:
        """fetchall() as a generator."""
        self.ensure_db_open()
        cursor = self.db.cursor()
        self.db_exec_with_cursor(cursor, sql, *args)
        try:
            row = cursor.fetchone()
            while row is not None:
                yield row
                row = cursor.fetchone()
        except:  # nopep8
            log.exception("gen_fetchall: SQL was: " + sql)
            raise