3.7.0-rc 3.6.0 (latest) 3.5.0 3.4.0 3.3.0 3.2.0 2.48.0-rc 2.47.1 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.0 2.22.1 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.1 2.14.0 2.13.0 2.12.0 2.11.0 Represents the stream of `Rows` and profile stats returned from [`spanner::Client::ProfileQuery()`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1Client#classgoogle_1_1cloud_1_1spanner_1_1Client_1abee0a6c093b2d7a645f899368b082eae).
This is a range defined by the [Input Iterators](https://en.cppreference.com/w/cpp/named_req/InputIterator) returned from its [`begin()`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ProfileQueryResult#classgoogle_1_1cloud_1_1spanner_1_1ProfileQueryResult_1a7fbad614bba6bbf79fd301c4c509c037) and [`end()`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ProfileQueryResult#classgoogle_1_1cloud_1_1spanner_1_1ProfileQueryResult_1a0cba7e7ca832bc5c86a775d4c4a01a0d) members. Callers may directly iterate the [`ProfileQueryResult`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ProfileQueryResult) instance, which will return a sequence of [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.html)`<`[`Row`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1Row)`>` objects.

For convenience, callers may wrap instances in a `StreamOf<std::tuple<...>>` object, which will automatically parse each [`Row`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1Row) into a `std::tuple` with the specified types.

###### Example:

      namespace spanner = ::google::cloud::spanner;
      spanner::SqlStatement select(
          "SELECT AlbumId, AlbumTitle, MarketingBudget"
          " FROM Albums"
          " WHERE AlbumTitle >= 'Aardvark' AND AlbumTitle < 'Goo'");
      auto profile_query_result = client.ProfileQuery(std::move(select));
      for (auto& row : profile_query_result) {
        if (!row) throw std::move(row).status();
        // Discard rows for brevity in this example.
      }

      // Stats are only available after all rows from the result have been read.
      auto execution_stats = profile_query_result.ExecutionStats();
      if (execution_stats) {
        for (auto const& stat : *execution_stats) {
          std::cout << stat.first << ":\t" << stat.second << "\n";
        }
      }

## Constructors

### ProfileQueryResult()

### ProfileQueryResult(std::unique_ptr\< ResultSourceInterface \>)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `source` | `std::unique_ptr< ResultSourceInterface >` |

### ProfileQueryResult(ProfileQueryResult \&\&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `ProfileQueryResult &&` |

## Operators

### operator=(ProfileQueryResult \&\&)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `ProfileQueryResult &&` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ProfileQueryResult &` |   |

## Functions

### begin()

Returns a [`RowStreamIterator`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1RowStreamIterator) defining the beginning of this result set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `RowStreamIterator` |   |

### end()

Returns a [`RowStreamIterator`](https://docs.cloud.google.com/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1RowStreamIterator) defining the end of this result set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `RowStreamIterator` |   |

### ReadTimestamp() const

Retrieves the timestamp at which the read occurred.

> [!NOTE]
> **Note:** Only available if a read-only transaction was used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::optional< Timestamp >` |   |

### ExecutionStats() const

Returns a collection of key value pair statistics for the SQL statement execution.

> [!NOTE]
> **Note:** Only available when the statement is executed and all results have been read.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::optional< std::unordered_map< std::string, std::string > >` |   |

### ExecutionPlan() const

Returns the plan of execution for the SQL statement.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::optional< spanner::ExecutionPlan >` |   |