

def iterate(self):
    row = self.cursor.fetchone()
    if (not row):
        self._populated = True
        if (not getattr(self.cursor, 'name', None)):
            self.cursor.close()
        raise StopIteration
    elif (not self._initialized):
        self.initialize(self.cursor.description)
        self._initialized = True
    return self.process_row(row)

dataset/ETHPy150Open coleifer/peewee/peewee.py QueryResultWrapper.iterate/original