# Google Cloud Spanner v1 API - Class PartitionReadOrQueryRequest (5.13.0-beta07)

5.13.0-beta07 5.13.0-beta06 5.12.0 (latest) 5.11.0 5.10.0 5.9.0 5.8.0 5.7.0 5.6.0 5.5.0 5.4.0 5.3.0 5.2.0 5.1.0 5.0.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.15.1 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0

    public sealed class PartitionReadOrQueryRequest

Reference documentation and code samples for the Google Cloud Spanner v1 API class PartitionReadOrQueryRequest.

Class for common properties of [PartitionReadRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionReadRequest) and [PartitionQueryRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionQueryRequest).

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> PartitionReadOrQueryRequest

## Inherited Members

[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Spanner.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1)

## Assembly

Google.Cloud.Spanner.V1.dll

## Properties

### PartitionOptions

    public PartitionOptions PartitionOptions { get; set; }

See [PartitionOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionReadRequest#Google_Cloud_Spanner_V1_PartitionReadRequest_PartitionOptions) and [PartitionOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionQueryRequest#Google_Cloud_Spanner_V1_PartitionQueryRequest_PartitionOptions)

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionOptions` |   |

### SessionAsSessionName

    public SessionName SessionAsSessionName { set; }

See [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionReadRequest#Google_Cloud_Spanner_V1_PartitionReadRequest_Session) and [Session](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionQueryRequest#Google_Cloud_Spanner_V1_PartitionQueryRequest_Session)

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SessionName` |   |

### Transaction

    public TransactionSelector Transaction { get; set; }

See [Transaction](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionReadRequest#Google_Cloud_Spanner_V1_PartitionReadRequest_Transaction) and [Transaction](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionQueryRequest#Google_Cloud_Spanner_V1_PartitionQueryRequest_Transaction)

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.TransactionSelector` |   |

## Methods

### GetCallSettings(SpannerSettings)

    public CallSettings GetCallSettings(SpannerSettings spannerSettings)

Extracts the corresponding CallSettings for the partition read or query request from the SpannerSettings.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `spannerSettings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.SpannerSettings` The SpannerSettings to extract the CallSettings from |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` | The CallSettings to use for the request |

### GetHashCode()

    public override int GetHashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

**Overrides** [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

### PartitionReadOrQueryAsync(PooledSession, CallSettings)

    public Task<PartitionResponse> PartitionReadOrQueryAsync(PooledSession session, CallSettings callSettings)

Executes a PartitionRead or PartitionQuery RPC asynchronously.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `session` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PooledSession` The session to use for the request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.PartitionResponse` | A task representing the asynchronous operation. When the task completes, the result is the response from the RPC. |