src/Leevel/Database/Select.php
protected function query()
    {
        $sql = $this->makeSql();

        $args = [
            $sql,
            $this->condition->getBindParams(),
            $this->queryParams['master'],
            $this->queryParams['fetch_args']['fetch_style'],
            $this->queryParams['fetch_args']['fetch_argument'],
            $this->queryParams['fetch_args']['ctor_args'],
        ];

        // 只返回 SQL，不做任何实际操作
        if (true === $this->onlyMakeSql) {
            return $args;
        }

        $data = $this->connect->query(...$args);

        if ($this->queryParams['as_default']) {
            $data = $this->queryDefault($data);
        } else {
            $data = $this->queryClass($data);
        }

        return $data;
    }
protected function query()
    {
        $sql = $this->makeSql();

        $args = [
            $sql,
            $this->condition->getBindParams(),
            $this->queryParams['master'],
            $this->queryParams['fetch_args']['fetch_style'],
            $this->queryParams['fetch_args']['fetch_argument'],
            $this->queryParams['fetch_args']['ctor_args'],
        ];

        // 只返回 SQL，不做任何实际操作
        if (true === $this->onlyMakeSql) {
            return $args;
        }

        $data = $this->connect->query(...$args);

        if ($this->queryParams['as_default']) {
            $data = $this->queryDefault($data);
        } else {
            $data = $this->queryClass($data);
        }

        return $data;
    }
查询获得结果.

@return mixed