Fetches the next row from a result set

@since   1.0
@param   int $fetchType Controls how the next row will be returned to the caller.
@return  bool Return value of this function depends on the fetch type. FALSE is returned on failure.
551104
public function fetch($fetchType = 'assoc')
    {
        if ($fetchType === 'num') {
            return $this->statement->fetch(\PDO::FETCH_NUM);
        } elseif ($fetchType === 'assoc') {
            return $this->statement->fetch(\PDO::FETCH_ASSOC);
        } elseif ($fetchType === 'obj') {
            return $this->statement->fetch(\PDO::FETCH_OBJ);
        }
    }
253897
public function fetchAll($type = \PDO::FETCH_ASSOC, $args = null, $ctorArgs = null)
    {
        $this->execute();

        if (!$this->cursor) {
            return false;
        }

        return $this->getCursor()->fetchAll($type);
    }
16365
public function nextval($type = null) {
		$result = $this->getByType('nextval');
		if (!empty($type)) {
			return $result[$type];
		}
		return $result;
	}
441596
protected function getResultsStrictTyped(\PDOStatement $stmt, int $fetchStyle = \PDO::FETCH_ASSOC)
    {
        /**
         * @var array|object|bool $results
         */
        $results = $stmt->fetchAll($fetchStyle);
        if (\is_array($results)) {
            return $results;
        } elseif (\is_object($results)) {
            return $results;
        }
        throw new \TypeError('Unexpected return type: ' . $this->getValueType($results));
    }
1029683
public function getNextOfType($type)
    {
        for (; $this->idx < $this->count; ++$this->idx) {
            if ($this->tokens[$this->idx]->type === $type) {
                return $this->tokens[$this->idx++];
            }
        }

        return null;
    }
746351
public function execute($fetchType = null)
    {
        if (!$fetchType) {
            $fetchType = $this->fetchType;
        }

        switch ($fetchType) {
            case (!\is_int($fetchType)):
                return Db::fetchObjects($this->getSql(), $this->params, $fetchType);
            case \PDO::FETCH_CLASS:
                return Db::fetchObjects($this->getSql(), $this->params);
            case \PDO::FETCH_ASSOC:
            default:
                return Db::fetchAll($this->getSql(), $this->params);
        }
    }
864328
protected function fetchResult(Select $select, AbstractResultSet $resultSet = null)
    {
        $resultSet = $resultSet ?: $this->getResultSet();
        $resultSet->buffer();

        if ($this->usePaginator()) {
            $this->setUsePaginator(false);
            $resultSet = $this->paginate($select, $resultSet);
        } else {
            $statement = $this->getSql()->prepareStatementForSqlObject($select);
            $result = $statement->execute();
            $resultSet->initialize($result);
        }

        return $resultSet;
    }
1073744
public function &LastRow($DatasetType = FALSE) {
      $Result = &$this->Result($DatasetType);
      if (count($Result) == 0)
         return $this->_EOF;

      return $Result[count($Result) - 1];
   }
906703
public function fetch($type=SQLAnywhereClient::FETCH_ASSOC)
	{
		$data = null;
		if ($this->result) {
			switch ($type) {
				case 'array':
					$data = sasql_fetch_array( $this->result );
				break;

				case 'assoc':
					$data = sasql_fetch_assoc( $this->result );
				break;

				case 'row':
					$data = sasql_fetch_row( $this->result );
				break;

				case 'field':
					$data = sasql_fetch_field( $this->result );
				break;

				case 'object':
					$data = sasql_fetch_object( $this->result );
				break;
				
				default:
					$data = sasql_fetch_array( $this->result );
				break;
			}		
		}
		return $data;
	}
441482
public function fetch($fetch_style = PDO::FETCH_ASSOC, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0)
    {
        return $this->PDO->fetch($fetch_style, $cursor_orientation, $cursor_offset);
    }
712674
public function fetch(int $fetch_style = \PDO::FETCH_ASSOC, int $cursor_orientation = null, int $cursor_offset = null)
    {
        $this->execute();
        
        return $this->stmt->fetch($fetch_style, $cursor_orientation, $cursor_offset);
    }
1347854
public function fetch($array, $type = 'object')
    {
        $data = [];
        //
        foreach ($array as $row) {
            //
            if ($type == 'object') {
                $rw = new Row();
                //
                foreach ($row as $index => $column) {
                    if (!is_int($index)) {
                        $rw->$index = $column;
                    }
                }
            } elseif ($type == 'array') {
                $rw = [];
                //
                foreach ($row as $index => $column) {
                    if (!is_int($index)) {
                        $rw[$index] = $column;
                    }
                }
            }

            //
            $data[] = $rw;
        }
        //
        return $data;
    }
671742
public function fetch($style = \PDO::FETCH_ASSOC, $orientation = \PDO::FETCH_ORI_NEXT, $offset = 0)
    {
        if ($this->rowCount() == 0) {
            return false;
        }

        $result = $this->statement->fetch($style, $orientation, $offset);

        if ($this->model !== null) {
            $model = $this->model;
            return new $model($result, false);
        } else {
            return $result;
        }
    }
116962
public function next() {
		if ($this->currentRecord < count($this->rows)) {
			$row = $this->rows[$this->currentRecord];
			$this->currentRecord++;
			return $row;
		} else {
			return false;
		}
	}
1086156
public function fetch($type = \PDO::FETCH_ASSOC, $ori = null, $offset = 0)
    {
        $this->execute();

        if (!$this->cursor) {
            return false;
        }

        return $this->getCursor()->fetch($type);
    }
533818
public function fetchAll($type = null)
    {
        try {
            if ($this->res === false) {
                throw new DatabaseException(__METHOD__ . " No ressource has been given", MySQL::NO_RESSOURCE, MySQL::SEVERITY_DEBUG, __FILE__, __LINE__);
            }

            switch ($type) {
                case MySQL::FETCH_ASSOC:
                    return $this->_db->fetch_assoc_list($this->res);
                    break;
                case MySQL::FETCH_NUM:
                    return $this->_db->fetch_num_list($this->res);
                    break;
                case MySQL::FETCH_OBJ:
                default:
                    return $this->_db->fetch_object_list($this->res);
                    break;
            }
        } catch (DatabaseException $e) {
            throw $e;
        }


    }
740937
public final function detectFetchType($fetchType): int
    {
        switch (gettype($fetchType)) {
            case 'NULL':
                return ResultInterface::AS_OBJECT;
            case 'integer':
                if (in_array($fetchType, [ResultInterface::AS_OBJECT, ResultInterface::AS_ARRAY_ASC,
                    ResultInterface::AS_ARRAY_NUM, ResultInterface::AS_ARRAY_ASCNUM])) {
                    return $fetchType;
                }
                break;
            case 'string':
                // shorthands
                if ($fetchType == 'array') return ResultInterface::AS_ARRAY_ASC;
                if ($fetchType == 'object') return ResultInterface::AS_OBJECT;

                //  object, array_asc etc.
                $fetchTypeConst = 'Oppa\Query\Result\ResultInterface::AS_'. strtoupper($fetchType);
                if (defined($fetchTypeConst)) {
                    return constant($fetchTypeConst);
                }

                // user classes
                if (class_exists($fetchType)) {
                    $this->setFetchObject($fetchType);

                    return ResultInterface::AS_OBJECT;
                }
                break;
        }

        throw new InvalidValueException("Given '{$fetchType}' fetch type is not implemented!");
    }