Fetches the next row from a result set

@return array|false
503822
public function fetch()
    {
        if ($this->resourceHandle !== null) {
            if (($row = $this->resourceHandle->fetch(\PDO::FETCH_ASSOC)) === false) {
                $this->freeResult();
            }

            return $row;
        }

        return false;
    }
844214
protected function getNextRow()
    {
        # If the result resource is invalid then don't bother trying to fetch
        if (!$this->result) {
            return;
        }

        switch ($this->mode) {

            case "mysql":
                $row = $this->result->fetch_assoc();
                break;

            case "postgres":
            case "redshift":
                $row = pg_fetch_assoc($this->result);
                break;

            case "odbc":
                $row = odbc_fetch_array($this->result, $this->position + 1);
                break;

            case "sqlite":
                $row = $this->result->fetchArray(SQLITE3_ASSOC);
                break;

            case "mssql":
                $row = mssql_fetch_assoc($this->result);
                break;

            case "mssqlsrv":
                sqlsrv_fetch($this->result, SQLSRV_SCROLL_ABSOLUTE, $this->position);
                $row = sqlsrv_fetch_array($this->result, SQLSRV_FETCH_ASSOC);

                if ($row) {
                    foreach ($row as &$value) {
                        if ($value instanceof \DateTime) {
                            $value = $value->format(\DateTime::ISO8601);
                        }
                    }
                }
                unset($value);
                break;
        }

        # If the fetch fails then there are no rows left to retrieve
        if (!$row) {
            return;
        }

        $this->position++;

        return $row;
    }
344708
protected function getOneRow()
    {
        if (null === $this->cols) {
            $result = $this->statement->result_metadata();
            if (false === $result) return false;

            $this->cols = [];

            // set column name
            foreach ($result->fetch_fields() as $col) {
                $this->cols[] = $col->name;
            }

            // bind values
            $this->vals = array_fill(0, count($this->cols), null);

            $refs = [];
            foreach ($this->vals as $i => &$f) {
                $refs[$i] = &$f;
            }
            call_user_func_array([$this->statement, 'bind_result'], $refs);
        }

        if ($this->statement->fetch()) {
            $row = [];
            foreach($this->cols as $i => $col) {
                $row[$col] = $this->vals[$i];
            }
            return $row;
        }

        return false;
    }
984351
public function next()
    {
        $row = $this->cursor->getNextItem();
        if ($row) {
            $beans = $this->repository->convertToBeans($this->type, array( $row ));
            $bean = array_shift($beans);
            return Model::wrap($bean);
        }
        return null;
    }
544592
public function getResult()
    {
        if ($this->map->currentModel->row instanceof Sql\DataObjects\Result\Row) {
            $criteria = $this->map->currentModel->row->offsetGet($this->map->currentPrimaryKey);
            $condition = [
                $this->map->intermediaryTable . '.' . $this->map->intermediaryCurrentForeignKey => $criteria,
            ];

            $this->map->intermediaryModel->qb
                ->select([
                    $this->map->referenceTable . '.*',
                ])
                ->from($this->map->intermediaryTable)
                ->join($this->map->referenceTable, implode(' = ', [
                    $this->map->referenceTable . '.' . $this->map->referencePrimaryKey,
                    $this->map->intermediaryTable . '.' . $this->map->intermediaryReferenceForeignKey,
                ]));

            if ($result = $this->map->intermediaryModel->findWhere($condition)) {
                return $result;
            }
        }

        return false;
    }
649793
public function fetchColumn()
    {
        $spec = $this->getResult();

        $data = $spec->fetch_row();
        if( is_array($data) ) {
            $data = current($data);
        }

        $this->free();
        return $data;
    }
637395
public function fetchRow()
    {
        $sth = $this->execute();
        $db = $this->db;

        return $sth->fetch($db::FETCH_ASSOC);
    }
1180925
public function fetchResults()
    {
        if (count($this->results) == 0) {
            while ($result = $this->fetchResult()) {
                $this->results[] = $result;
            }
        }

        return $this->results;
    }
1240594
public function next()
    {
        if ($this->cursor_position < $this->count() && $row = $this->resource->fetch_assoc()) {
            // for getting the current row
            $this->setCurrentRow($row);
            ++$this->cursor_position;

            return true;
        }

        return false;
    }
51527
protected function _fetch_row($result, $mode)
    {
        if ($result || ($result === null && ($result = $this->last_result))) {
            if ($result !== true) {
                return $result->fetch($mode);
            }
        }

        return false;
    }
608738
public function getNextBatch()
    {
        if ($this->_result === [] && $this->_hasMore) {
            // read more from server
            $this->fetchOutstanding();
        }

        if ($this->_result !== []) {
            $result        = $this->_result;
            $this->_result = [];

            return $result;
        }

        // cursor is exhausted
        return false;
    }
1153174
public function row()
	{
		$row = $this->query->fetch('row');

		return ($row) ? self::newFromResults($row) : self::blank();
	}
613180
public function getResults()
    {
        if (empty($this->results)) {
            $this->results = $this->stmt->fetchAll();
        }

        return $this->results;
    }
124326
protected function _fetchResult()
    {
        if (!$this->_statement) {
            return false;
        }

        $row = $this->_statement->fetch('assoc');
        if ($row === false) {
            return $row;
        }

        return $this->_groupResult($row);
    }
502642
public function getFirst()
    {
        $row = $this->getIterator()->current();

        if ($row !== null) {
            $this->close(); // don't leave the SQL statement open
        }

        return $row;
    }
352328
private function _resultSet()
    {
        if (!isset($this->_resultSet)) {
            foreach ($this->_before as $callback) {
                $callback($this->_query);
            }
            $this->_resultSet = $this->_query->execute();
        }

        return $this->_resultSet;
    }
342912
public function fetchNextObject()
	{
		if( $this->cursor < $this->RecordCount() )
		{
			$this->cursor ++;
			return $this->rows[$this->cursor-1];
		}
		else return FALSE;
	}