Esempio n. 1
0
    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()
Esempio n. 2
0
    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()
Esempio n. 3
0
 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
Esempio n. 4
0
    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())
Esempio n. 5
0
    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())
Esempio n. 6
0
 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
Esempio n. 7
0
 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)
Esempio n. 8
0
 def __iter__(self):
     it = _cursor.__iter__(self)
     yield self._dict_tuple(next(it))
     while 1:
         yield self._dict_tuple(next(it))
Esempio n. 9
0
 def __iter__(self):
     it = _cursor.__iter__(self)
     yield self._dict_tuple(next(it))
     while 1:
         yield self._dict_tuple(next(it))