src/DB/Drivers/PDOSqlDriver.php
public function fetchAll($sql, $fetch_style = PDO::FETCH_ASSOC, $fetch_argument = null, $ctor_args = array())
    {
        try {
            $data = $this->pdo->query($sql);
            if (null !== $fetch_argument) {
                switch ($fetch_style) {
                    case PDO::FETCH_CLASS:
                        return $data->fetchAll($fetch_style, $fetch_argument, $ctor_args);

                    default:
                        return $data->fetchAll($fetch_style, $fetch_argument);
                }

            } else {
                return $data->fetchAll($fetch_style);
            }
        } catch (Exception $e) {
            throw new CoreException($e->getMessage());
        }
    }
public function fetchAll($sql, $fetch_style = PDO::FETCH_ASSOC, $fetch_argument = null, $ctor_args = array())
    {
        try {
            $data = $this->pdo->query($sql);
            if (null !== $fetch_argument) {
                switch ($fetch_style) {
                    case PDO::FETCH_CLASS:
                        return $data->fetchAll($fetch_style, $fetch_argument, $ctor_args);

                    default:
                        return $data->fetchAll($fetch_style, $fetch_argument);
                }

            } else {
                return $data->fetchAll($fetch_style);
            }
        } catch (Exception $e) {
            throw new CoreException($e->getMessage());
        }
    }
执行sql 并返回所有结果

@param string $sql
@param int $fetch_style
@param null $fetch_argument
@param array $ctor_args
<pre>
当fetch_style为PDO::FETCH_CLASS时, 自定义类的构造函数的参数。
</pre>
@return array
@throws CoreException