# Interface ResultSetOrBuilder (6.118.0)

6.118.0 (latest) 6.116.0 6.111.1 6.108.0 6.107.0 6.103.0 6.102.1 6.101.1 6.100.0 6.99.0 6.98.1 6.97.1 6.96.1 6.95.1 6.94.0 6.93.0 6.89.0 6.88.0 6.87.0 6.86.0 6.85.0 6.83.0 6.82.0 6.80.1 6.79.0 6.77.0 6.74.1 6.72.0 6.71.0 6.69.0 6.68.0 6.66.0 6.65.1 6.62.0 6.60.0 6.58.0 6.57.0 6.56.0 6.55.0 6.54.0 6.53.0 6.52.1 6.51.0 6.50.1 6.49.0 6.25.1 6.24.0 6.23.4 6.22.0 6.21.2 6.20.0 6.19.1 6.18.0 6.17.4 6.14.1

    public interface ResultSetOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCacheUpdate()

    public abstract CacheUpdate getCacheUpdate()

Optional. A cache update expresses a set of changes the client should
incorporate into its location cache. The client should discard the changes
if they are older than the data it already has. This data can be obtained
in response to requests that included a `RoutingHint` field, but may also
be obtained by explicit location-fetching RPCs which may be added in the
future.

`
.google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.CacheUpdate` | The cacheUpdate. |

### getCacheUpdateOrBuilder()

    public abstract CacheUpdateOrBuilder getCacheUpdateOrBuilder()

Optional. A cache update expresses a set of changes the client should
incorporate into its location cache. The client should discard the changes
if they are older than the data it already has. This data can be obtained
in response to requests that included a `RoutingHint` field, but may also
be obtained by explicit location-fetching RPCs which may be added in the
future.

`
.google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.CacheUpdateOrBuilder` |   |

### getMetadata()

    public abstract ResultSetMetadata getMetadata()

Metadata about the result set, such as row type information.

`.google.spanner.v1.ResultSetMetadata metadata = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ResultSetMetadata` | The metadata. |

### getMetadataOrBuilder()

    public abstract ResultSetMetadataOrBuilder getMetadataOrBuilder()

Metadata about the result set, such as row type information.

`.google.spanner.v1.ResultSetMetadata metadata = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ResultSetMetadataOrBuilder` |   |

### getPrecommitToken()

    public abstract MultiplexedSessionPrecommitToken getPrecommitToken()

Optional. A precommit token is included if the read-write transaction is on
a multiplexed session. Pass the precommit token with the highest sequence
number from this transaction attempt to the
Commit request for this transaction.

`
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.MultiplexedSessionPrecommitToken` | The precommitToken. |

### getPrecommitTokenOrBuilder()

    public abstract MultiplexedSessionPrecommitTokenOrBuilder getPrecommitTokenOrBuilder()

Optional. A precommit token is included if the read-write transaction is on
a multiplexed session. Pass the precommit token with the highest sequence
number from this transaction attempt to the
Commit request for this transaction.

`
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder` |   |

### getRows(int index)

    public abstract ListValue getRows(int index)

Each element in `rows` is a row whose format is defined by
metadata.row_type. The ith
element in each row matches the ith field in
metadata.row_type. Elements
are encoded based on type as described here.

`repeated .google.protobuf.ListValue rows = 2;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ListValue.html` |   |

### getRowsCount()

    public abstract int getRowsCount()

Each element in `rows` is a row whose format is defined by
metadata.row_type. The ith
element in each row matches the ith field in
metadata.row_type. Elements
are encoded based on type as described here.

`repeated .google.protobuf.ListValue rows = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getRowsList()

    public abstract List<ListValue> getRowsList()

Each element in `rows` is a row whose format is defined by
metadata.row_type. The ith
element in each row matches the ith field in
metadata.row_type. Elements
are encoded based on type as described here.

`repeated .google.protobuf.ListValue rows = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ListValue.html>` |   |

### getRowsOrBuilder(int index)

    public abstract ListValueOrBuilder getRowsOrBuilder(int index)

Each element in `rows` is a row whose format is defined by
metadata.row_type. The ith
element in each row matches the ith field in
metadata.row_type. Elements
are encoded based on type as described here.

`repeated .google.protobuf.ListValue rows = 2;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ListValueOrBuilder.html` |   |

### getRowsOrBuilderList()

    public abstract List<? extends ListValueOrBuilder> getRowsOrBuilderList()

Each element in `rows` is a row whose format is defined by
metadata.row_type. The ith
element in each row matches the ith field in
metadata.row_type. Elements
are encoded based on type as described here.

`repeated .google.protobuf.ListValue rows = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.protobuf.ListValueOrBuilder>` |   |

### getStats()

    public abstract ResultSetStats getStats()

Query plan and execution statistics for the SQL statement that
produced this result set. These can be requested by setting
ExecuteSqlRequest.query_mode.
DML statements always produce stats containing the number of rows
modified, unless executed using the
ExecuteSqlRequest.QueryMode.PLAN
ExecuteSqlRequest.query_mode.
Other fields might or might not be populated, based on the
ExecuteSqlRequest.query_mode.

`.google.spanner.v1.ResultSetStats stats = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ResultSetStats` | The stats. |

### getStatsOrBuilder()

    public abstract ResultSetStatsOrBuilder getStatsOrBuilder()

Query plan and execution statistics for the SQL statement that
produced this result set. These can be requested by setting
ExecuteSqlRequest.query_mode.
DML statements always produce stats containing the number of rows
modified, unless executed using the
ExecuteSqlRequest.QueryMode.PLAN
ExecuteSqlRequest.query_mode.
Other fields might or might not be populated, based on the
ExecuteSqlRequest.query_mode.

`.google.spanner.v1.ResultSetStats stats = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ResultSetStatsOrBuilder` |   |

### hasCacheUpdate()

    public abstract boolean hasCacheUpdate()

Optional. A cache update expresses a set of changes the client should
incorporate into its location cache. The client should discard the changes
if they are older than the data it already has. This data can be obtained
in response to requests that included a `RoutingHint` field, but may also
be obtained by explicit location-fetching RPCs which may be added in the
future.

`
.google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the cacheUpdate field is set. |

### hasMetadata()

    public abstract boolean hasMetadata()

Metadata about the result set, such as row type information.

`.google.spanner.v1.ResultSetMetadata metadata = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the metadata field is set. |

### hasPrecommitToken()

    public abstract boolean hasPrecommitToken()

Optional. A precommit token is included if the read-write transaction is on
a multiplexed session. Pass the precommit token with the highest sequence
number from this transaction attempt to the
Commit request for this transaction.

`
.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the precommitToken field is set. |

### hasStats()

    public abstract boolean hasStats()

Query plan and execution statistics for the SQL statement that
produced this result set. These can be requested by setting
ExecuteSqlRequest.query_mode.
DML statements always produce stats containing the number of rows
modified, unless executed using the
ExecuteSqlRequest.QueryMode.PLAN
ExecuteSqlRequest.query_mode.
Other fields might or might not be populated, based on the
ExecuteSqlRequest.query_mode.

`.google.spanner.v1.ResultSetStats stats = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the stats field is set. |