Fetches the next block of data when using cursors.

@throws coding_exception If you call this when the fetch buffer wasn't freed yet
352774
protected function fetch_cursor_block() {
        if ($this->result) {
            throw new coding_exception('Unexpected non-empty result when fetching from cursor');
        }
        list($this->result, $this->lastbatch) = $this->db->fetch_from_cursor($this->cursorname);
        if (!$this->result) {
            throw new coding_exception('Unexpected failure when fetching from cursor');
        }
    }
203581
async def fetchone(self):
        
        row = await self._cursor.fetchone()
        if not row:
            raise GeneratorExit
        self._rows.append(row)
21845
public function next()
    {
        $this->currentRow = $this->dataFetcher->fetch();
        $this->currentKey++;
        $this->isValid = (Boolean) $this->currentRow;
        if (!$this->isValid) {
            $this->closeCursor();
        }
    }
355749
public function next()
    {
        if (!isset($this->tokens[$this->position])) {
            throw new SyntaxError('Unexpected end of expression', $this->current->cursor);
        }

        ++$this->position;

        $this->current = $this->tokens[$this->position];
    }
715321
protected function fetchBlocks()
    {
        if (null === $this->blocks)
        {
            $this->blocks = array();

            $allBlocks = ContentBlockQuery::create()
                ->find()
            ;

            foreach ($allBlocks as $block)
            {
                /* @var $block ContentBlock */
                $this->blocks[$block->getName()][$block->getLocale()] = $block;
            }
        }
    }
763910
private boolean toBoundedNext() throws FetchException {
        if (!toNext()) {
            return false;
        }

        if (mEndBound != null) {
            byte[] currentKey = getCurrentKey();
            if (currentKey == null) {
                return false;
            }
            int result = compareKeysPartially(currentKey, mEndBound);
            if (result >= 0) {
                if (result > 0 || !mInclusiveEnd) {
                    return false;
                }
            }
        }

        return prefixMatches();
    }
1041549
@Override
	public T next() {
		SQLException sqlException = null;
		try {
			T result = nextThrow();
			if (result != null) {
				return result;
			}
		} catch (SQLException e) {
			sqlException = e;
		}
		// we have to throw if there is no next or on a SQLException
		last = null;
		closeQuietly();
		throw new IllegalStateException("Could not get next result for " + dataClass, sqlException);
	}
1259068
public function next()
    {
        // Try to get an object
        $this->current = $current = $this->reader->fetchObject($this->class);

        if ($current) {
            $this->key++;
        }
    }
162124
protected function fetchNextRecords()
    {
        if (!$this->use_fixed_offset) {
            $this->query->offset($this->query_offset);
        }
        if ($this->clean_memory_on_fetch) {
            // Attempt to clean php memory
            $this->results_cache = null;
            BeanFactoryCache::clearCache();
            gc_collect_cycles();
        }
        $this->results_cache = $this->query->execute();
        $this->cache_current_index = 0;
    }
508440
public final void mFETCH() throws RecognitionException {
		try {
			int _type = FETCH;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:28:7: ( 'fetch' )
			// hql.g:28:9: 'fetch'
			{
			match("fetch"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
410276
def next(self):
        
        if self._has_finished:
            raise StopIteration

        if not len(self._buffer):
                    
            results = self.fetch_next_block()
            self._buffer.extend(results)
            
        if not len(self._buffer):
            raise StopIteration
            
        return self._buffer.popleft()
486440
public function fetch()
    {
        $this->throwIfContextInvalid();

        $this->reloadQueryAdapter();
        $results = $this->activeQuery->fetch();

        $this->resetCurrentQuery();

        if (!is_array($results) && get_class($results) === "WP_Error") {
            throw new Exception(json_encode($results));
        }

        return $this->wrapInEntities($results);
    }
877561
def next(self):
        
        while True:
            self.cur_idx += 1
            if self.__datasource.populate_iteration(self):
                return self

        raise StopIteration
1186697
function next() {
        $this->unmoved = false;
        if ($this->valid()) {
            $this->currentInstance++;
            if (!isset($this->instanceCache[$this->currentInstance])) {
                // try to load next block (unless we know it's empty)
                $remainingInstances = !$this->endOfClass && $this->load($this->classIterator->current(), $this->currentInstance);
                
                // endOfClass or failed loading
                if (!$remainingInstances) {
                    $this->classIterator->next();
                    $this->ensureNotEmpty();
                }
            }
        }
    }
608739
@Override
	public T next() {

		validateState();

		if (!hasNext()) {
			throw new NoSuchElementException("No more elements available for cursor " + getCursorMark() + ".");
		}

		T next = moveNext(delegate);
		position++;
		return next;
	}
3324
function next() {
        $this->unmoved = false;
        if ($this->valid()) {
            $this->currentInstance++;
            if (!isset($this->instanceCache[$this->currentInstance])) {
                // try to load next block (unless we know it's empty)
                $remainingInstances = !$this->endOfResource && $this->load($this->resourceIterator->current(), $this->currentInstance);

                // endOfClass or failed loading
                if (!$remainingInstances) {
                    $this->resourceIterator->next();
                    $this->ensureNotEmpty();
                }
            }
            $this->ensureValidResult();
        }
    }
775120
private void fetchNext() {
        if (null != this.pendingUtc_ || this.done_) {
            return;
        }

        DateValue dUtc = this.generateInstance();

        // check the exit condition
        if (null != dUtc && this.condition_.apply(dUtc)) {
            this.pendingUtc_ = dUtc;
            this.yearGenerator_.workDone();
        } else {
            this.done_ = true;
        }
    }