Fetches row from given result set as an associative array.
@param SQLite3Result $resultSet
@return array
337203
public function fetch($resultSet){
		$row = $resultSet->fetchArray(SQLITE3_ASSOC);
		$charset = $this->charset === null ? null : $this->charset . '//TRANSLIT';

		if($row){
			$fields = array();
			foreach($row as $key => $val){
				if($charset !== null && is_string($val))
					$val = iconv($this->dbcharset, $charset, $val);
				$fields[str_replace(array('[', ']'), '', $key)] = $val;
			}
			return $fields;
		}
		return $row;
	}
732230
public function getColumnTypes($resultSet, $table){
		if($table === null)
			return array();
		$cols = pg_meta_data($this->resource, $table);
		foreach($cols as $key => $value){
			$cols[$key] = preg_replace('~[^a-z]~i', '', $value['type']);
		}
		return $cols;
	}
655404
protected function _formatRelatedRowset($rowset) {
        $out = array();
        foreach ($rowset as $row) {
            if (is_array($row)) {
                $values = array_values($row);
                $values = implode(' : ', $values);
                $out[] = $values;
                continue;
            }
            $out[] = $row;
        }
        $out = implode(' | ', $out);
        return $out;
    }
7116
public function fetch(int $fetchStyle = \PDO::FETCH_ASSOC, int $cursorOrientation = \PDO::FETCH_ORI_NEXT, int $cursorOffset = 0)
    {
        return $this->statement->fetch($fetchStyle, $cursorOrientation, $cursorOffset);
    }
829512
function fetch_arrays($sql)
    {
        $rs   = $this->query($sql);
        $data = [];
        while (true == ($row = $rs->fetch_assoc())) {
            $data[] = $row;
        }
        $rs->free();
        return $data;
    }
499052
private function extractResults($resultSet)
    {
        foreach ($resultSet['results'] as $result) {
            foreach ($result['data'] as $data) {
                if (isset($data['graph'])) {
                    foreach ($data['graph']['nodes'] as $node) {
                        $this->nodesMap[$node['id']] = $node;
                    }
                    foreach ($data['graph']['relationships'] as $rel) {
                        $this->relationshipsMap[$rel['id']] = $rel;
                    }
                }
            }
        }
    }
811311
protected function _fetch_object($class_name = 'stdClass')
	{
		// No native support for fetching rows as objects
		if (($row = $this->result_id->fetchArray(SQLITE3_ASSOC)) === FALSE)
		{
			return FALSE;
		}
		elseif ($class_name === 'stdClass')
		{
			return (object) $row;
		}

		$class_name = new $class_name();
		foreach (array_keys($row) as $key)
		{
			$class_name->$key = $row[$key];
		}

		return $class_name;
	}
922865
public function paginate($select, $resultSet = null)
    {
        $resultSet = $resultSet ?: $this->getResultSet();
        $adapter = new DbSelect($select, $this->getAdapter(), $resultSet);
        $paginator = new Paginator($adapter);

        $options = $this->getPaginatorOptions();

        if (isset($options['limit'])) {
            $paginator->setItemCountPerPage($options['limit']);
        }

        if (isset($options['page'])) {
            $paginator->setCurrentPageNumber($options['page']);
        }

        $paginator->setPageRange(5);

        return $paginator;
    }
1205692
private function finalResultPages(array $fields, array $resultPage)
    {
        return array_map(
            function ($resultRows) use ($fields) {
                return $this->getRows($resultRows, $fields);
            },
            $resultPage
        );
    }
869888
public function getPrimaryKey($table, $resultSet = null){
		if($resultSet instanceof PDOStatement){
			$i = 0;
			while($col = $resultSet->getColumnMeta($i++)){
				if(in_array('primary_key', $col['flags']))
					$primaryKey = $col['name'];
			}
		}
		if(isset($primaryKey))
			return $primaryKey;
		throw new ImplementationException;
	}
791365
public static function getColumnLabels(ResultSet $resultSet)
    {
        $columnLabels = [];
        foreach ($resultSet->getColumnTypes() as $columnType) {
            $columnLabels[] = $columnType->getLabelName();
        }

        return $columnLabels;
    }
365812
public function fetchArray()
	{
		if( isset( $this->rows[$this->cursor] ) )
		{
			$row = $this->rows[$this->cursor];
			return $row->getPairs();
		}
		else return FALSE;
	}
412692
public function fetchRows($sql, array $parameters = [], $indexedKeys = false)
    {
        $statement = $this->executeQuery($sql, $parameters);

        return $statement->fetchAll($indexedKeys ? PDO::FETCH_NUM : PDO::FETCH_ASSOC);
    }
688435
public function loadNextAssoc()
	{
		$this->connect();

		// Execute the query and get the result set cursor.
		if (!$this->executed)
		{
			if (!($this->execute()))
			{
				return $this->errorNum ? null : false;
			}
		}

		// Get the next row from the result set as an object of type $class.
		$row = $this->fetchAssoc();

		if ($row)
		{
			return $row;
		}

		// Free up system resources and return.
		$this->freeResult();

		return false;
	}
166783
public function fetch_array($sql)
    {
        $rs   = $this->query($sql);
        $data = $rs->fetchArray(SQLITE3_ASSOC);
        $GLOBALS['__$DB_QUERY_COUNT']++;

        $rs->finalize();
        return $data;
    }
496499
public function fetchRow($sql, array $parameters = [], $indexedKeys = false)
    {
        $statement = $this->executeQuery($sql, $parameters);

        return $statement->fetch($indexedKeys ? PDO::FETCH_NUM : PDO::FETCH_ASSOC);
    }
895456
public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
    {
        if (! is_resource($this->result)) {
            return false;
        }

        $fetchMode = $fetchMode ?: $this->defaultFetchMode;

        switch ($fetchMode) {
            case FetchMode::COLUMN:
                return $this->fetchColumn();

            case FetchMode::ASSOCIATIVE:
                return sasql_fetch_assoc($this->result);

            case FetchMode::MIXED:
                return sasql_fetch_array($this->result, SASQL_BOTH);

            case FetchMode::CUSTOM_OBJECT:
                $className = $this->defaultFetchClass;
                $ctorArgs  = $this->defaultFetchClassCtorArgs;

                if (func_num_args() >= 2) {
                    $args      = func_get_args();
                    $className = $args[1];
                    $ctorArgs  = $args[2] ?? [];
                }

                $result = sasql_fetch_object($this->result);

                if ($result instanceof stdClass) {
                    $result = $this->castObject($result, $className, $ctorArgs);
                }

                return $result;

            case FetchMode::NUMERIC:
                return sasql_fetch_row($this->result);

            case FetchMode::STANDARD_OBJECT:
                return sasql_fetch_object($this->result);

            default:
                throw new SQLAnywhereException('Fetch mode is not supported: ' . $fetchMode);
        }
    }