Fetch row as associative.

@return array or null
355846
function fetch_entry() {
		if ($this->resultset === null) {
			throw new Panic('Tried to fetch_entry on un-executed statement');
		}

		if (empty($this->resultset)) {
			return null;
		}
		else { // succesfully retrieved statement
			return $this->resultset[0];
		}
	}
628584
public function fetch($type = 'num')
    {
        $row = parent::fetch($type);
        if ($type == 'assoc' && is_array($row) && !empty($this->_driver->autoShortenedIdentifiers)) {
            //Need to preserve order of row results
            $translatedRow = [];
            foreach ($row as $key => $val) {
                if (array_key_exists($key, $this->_driver->autoShortenedIdentifiers)) {
                    $translatedRow[$this->_driver->autoShortenedIdentifiers[$key]] = $val;
                } else {
                    $translatedRow[$key] = $val;
                }
            }
            $row = $translatedRow;
        }
        return $row;
    }
499102
function fetch() {

        $this->execute();

        list( $index, $row ) = each( $this->rows );

        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;
    }
1072440
public function getRows()
    {
        $rows = [];

        foreach ($this->getComponents() as $component) {
            $rows[] = [
                $component->getStudlyName(),
                $component->enabled() ? 'Enabled' : 'Disabled',
                $component->get('order'),
                $component->getPath(),
            ];
        }

        return $rows;
    }
863182
public function fetchAll()
    {
        $query = sprintf('SELECT * FROM `%s`', $this->table);
        $rows = array();

        foreach ($this->pdo->query($query) as $index => $row) {
            $value =& $row[ConstProviderInterface::CONFIG_PARAM_VALUE];

            if ($this->serializer->isSerialized($value)) {
                $value = $this->serializer->unserialize($value);
            }

            array_push($rows, $row);
        }

        return $rows;
    }
260161
protected function _getRow()
    {
        if (!isset($this->_row)) {
            $model = $this->getOwnModel();
            if (!$model) return null;
            $dbId = $this->getData()->dbId;
            $sharedDataClass = self::getFlag($this->getData()->componentClass, 'sharedDataClass');
            if ($sharedDataClass) {
                $component = $this->getData();
                while ($component) {
                    if (is_instance_of($component->componentClass, $sharedDataClass))
                        $dbId = $component->dbId;
                    $component = $component->parent;
                }
            }

            $this->_row = $model->getRow($dbId);
            if (!$this->_row) {
                $this->_row = $model->createRow();
                $this->_row->component_id = $dbId;
            }
        }
        return $this->_row;
    }
525122
function fetch($fetchMode = PDO::FETCH_ASSOC) {
        return $this->_data($this->query()->fetch($fetchMode),false);
        //return $this->query()->fetch($fetchMode);
    }
365812
public function fetchArray()
	{
		if( isset( $this->rows[$this->cursor] ) )
		{
			$row = $this->rows[$this->cursor];
			return $row->getPairs();
		}
		else return FALSE;
	}
1068381
public function getRow($fetch_style = null)
    {
        if (is_null($fetch_style)) {
            $fetch_style = \PDO::FETCH_ASSOC;
        }
        try {
            return $this->stmt->fetch($fetch_style);
        } catch (\PDOException $e) {
            die("Error: " . $e->getMessage());
        }
    }
922170
public function get(): array
    {
        try {
            $rows = $this->baseQuery->get();
            return array_map([$this, 'processFetchedRow'], $rows);
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
675836
public function getFirst()
    {
        if (is_array($this->rows)) {
            $rows = &$this->rows;
        } else {
            $query = clone $this->query;
            $query->setLimit(1);
            $rows = $query->getResult();
        }

        return (isset($rows[0])) ? $rows[0] : null;
    }
312285
public function fetchRow()
    {
        $this->fields = $this->getStatement()->fetch();

        if (false === $this->fields) {
            $this->EOF = true;
        }

        return $this->fields;
    }
674126
public function getRowAt($row_num)
    {
        if ($this->seek($row_num)) {
            $this->next();

            return $this->getCurrentRow();
        } else {
            return null;
        }
    }
395208
protected function fetchData()
    {
        if (null === $this->_dataReader) {
            $qb = clone $this->qs->getQueryBuilder();
            $this->_dataReader = new DataReader($this->connection->query($qb->toSQL()));
        }
        $rows = [];
        $count = 0;
        while ($count++ < $this->batchSize && ($row = $this->_dataReader->read())) {
            $rows[] = $row;
        }

        return $this->asArray ? $rows : $this->qs->createModels($rows);
    }
839442
protected function getHeaderRow()
    {
        $first_item = reset($this->data);

        $keys       = array_keys($first_item);
        $first_key  = reset($keys);

        // We have an associative array (probably), let's have a header row
        if (!is_int($first_key)) {
            return array_combine($keys, $keys);
        }

        return false;
    }
997872
public function toArray()
    {
        $result = array();
        foreach ($this as $key => $row) {
            $result[$key] = $row->toArray();
        }
        return $result;
    }