code: def gen_fetchall(self, sql: str, *args) -> Iterator[Sequence[Any]]:
          
          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
docs: fetchall() as a generator.