solvebio/query.py
def next(self):
        """
        Allows the Query object to be an iterable.

        This method will iterate through a cached result set
        and fetch successive pages as required.

        A `StopIteration` exception will be raised when there aren't
        any more results available or when the requested result
        slice range or limit has been fetched.

        Returns: The next result.
        """
        if not hasattr(self, '_cursor'):
            # Iterator not initialized yet
            self.__iter__()

        # len(self) returns `min(limit, total)` results
        if self._cursor == len(self):
            raise StopIteration()

        if self._buffer_idx == len(self._buffer):
            self.execute(self._page_offset + self._buffer_idx)
            self._buffer_idx = 0

        self._cursor += 1
        self._buffer_idx += 1
        return self._buffer[self._buffer_idx - 1]
def next(self):
        if not hasattr(self, '_cursor'):
            # Iterator not initialized yet
            self.__iter__()

        # len(self) returns `min(limit, total)` results
        if self._cursor == len(self):
            raise StopIteration()

        if self._buffer_idx == len(self._buffer):
            self.execute(self._page_offset + self._buffer_idx)
            self._buffer_idx = 0

        self._cursor += 1
        self._buffer_idx += 1
        return self._buffer[self._buffer_idx - 1]
def next ( self ) : if not hasattr ( self , '_cursor' ) : # Iterator not initialized yet self . __iter__ ( ) # len(self) returns `min(limit, total)` results if self . _cursor == len ( self ) : raise StopIteration ( ) if self . _buffer_idx == len ( self . _buffer ) : self . execute ( self . _page_offset + self . _buffer_idx ) self . _buffer_idx = 0 self . _cursor += 1 self . _buffer_idx += 1 return self . _buffer [ self . _buffer_idx - 1 ]
Allows the Query object to be an iterable.

        This method will iterate through a cached result set
        and fetch successive pages as required.

        A `StopIteration` exception will be raised when there aren't
        any more results available or when the requested result
        slice range or limit has been fetched.

        Returns: The next result.
Allows the Query object to be an iterable .