def __iter__(self): if self._prefetch: res = _cursor.__iter__(self) first = res.next() if self._query_executed: self._build_index() if not self._prefetch: res = _cursor.__iter__(self) first = res.next() yield first while 1: yield res.next()
def __iter__(self): it = _cursor.__iter__(self) try: yield self._dict_tuple(next(it)) while 1: yield self._dict_tuple(next(it)) except StopIteration: pass
def __iter__(self): it = _cursor.__iter__(self) t = it.next() nt = self.Record if nt is None: nt = self.Record = self._make_nt() yield nt(*t) while 1: yield nt(*it.next())
def __iter__(self): it = _cursor.__iter__(self) get_next = it.__next__ try: t = get_next() except StopIteration: return cols = self.description yield MutableRow(cols, t) while 1: try: yield MutableRow(cols, get_next()) except StopIteration: return
def __iter__(self): it = TupleCursor.__iter__(self) back_as = self.back_as if back_as: try: back_as = self.connection.back_as_registry[back_as] except KeyError: raise BadBackAs(back_as, self.connection.back_as_registry) while True: try: t = next(it) except StopIteration: return yield (back_as(self.description, t) if back_as else t)
def __iter__(self): it = _cursor.__iter__(self) yield self._dict_tuple(next(it)) while 1: yield self._dict_tuple(next(it))