classes/Connection.php
public function query($query, ...$data)
    {
        if ($data) {
            $query = $this->merge($query, $data);
        }

        try {
            $statement = $this->pdo->query($query);

            return new Result($statement);
        } catch (PDOException $exception) {
            throw new QueryException($exception, $query);
        }
    }
public function query($query, ...$data)
    {
        if ($data) {
            $query = $this->merge($query, $data);
        }

        try {
            $statement = $this->pdo->query($query);

            return new Result($statement);
        } catch (PDOException $exception) {
            throw new QueryException($exception, $query);
        }
    }
public function query ( $ query , ... $ data ) { if ( $ data ) { $ query = $ this -> merge ( $ query , $ data ) ; } try { $ statement = $ this -> pdo -> query ( $ query ) ; return new Result ( $ statement ) ; } catch ( PDOException $ exception ) { throw new QueryException ( $ exception , $ query ) ; } }
Run a query and return the result

The result can be interactively fetched, but only once due to the
forward-only cursor being used to fetch the results.

@param string $query
@param mixed  ...$data
@return Result
@throws QueryException
Run a query and return the result