public function query(string $sql, array $params = []): Statement
    {
        if (!$stmt = sqlsrv_query($this->connection, $sql, $params)) {
            throw new SqlException('Query failed', sqlsrv_errors(), $sql, $params);
        }

        $statement = new Statement($stmt, false, $sql, $params);
        $statement->execute();
        return $statement;
    }