Google Cloud Spanner v1 API - Class ReadOrQueryRequest (4.4.0)

public sealed class ReadOrQueryRequest

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

Class for common properties of ReadRequest and ExecuteSqlRequest.

Inheritance

object > ReadOrQueryRequest

Namespace

GoogleGoogle.CloudGoogle.Cloud.SpannerV1

Assembly

Google.Cloud.Spanner.V1.dll

Properties

ExecuteSqlRequest

public ExecuteSqlRequest ExecuteSqlRequest { get; }

The underlying ExecuteSqlRequest if this is a query, and null otherwise.

Property Value
TypeDescription
ExecuteSqlRequest

IsQuery

public bool IsQuery { get; }

True if this is query, and false otherwise.

Property Value
TypeDescription
bool

IsRead

public bool IsRead { get; }

True if this is a read, and false otherwise.

Property Value
TypeDescription
bool

PartitionToken

public ByteString PartitionToken { get; set; }
Property Value
TypeDescription
ByteString

ReadRequest

public ReadRequest ReadRequest { get; }

The underlying ReadRequest if this is a read, and null otherwise.

Property Value
TypeDescription
ReadRequest

ResumeToken

public ByteString ResumeToken { set; }
Property Value
TypeDescription
ByteString

Session

public string Session { get; }

See Session and Session

Property Value
TypeDescription
string

SessionAsSessionName

public SessionName SessionAsSessionName { set; }

See Session and Session

Property Value
TypeDescription
SessionName

Transaction

public TransactionSelector Transaction { set; }
Property Value
TypeDescription
TransactionSelector

Methods

CloneRequest()

public ReadOrQueryRequest CloneRequest()

See Google.Cloud.Spanner.V1.ReadRequest.Clone and Google.Cloud.Spanner.V1.ExecuteSqlRequest.Clone

Returns
TypeDescription
ReadOrQueryRequest

ExecuteReadOrQueryStreamReader(PooledSession, CallSettings)

public ReliableStreamReader ExecuteReadOrQueryStreamReader(PooledSession session, CallSettings callSettings)

Creates a ReliableStreamReader for this request

Parameters
NameDescription
sessionPooledSession

The session to use for the request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ReliableStreamReader

A ReliableStreamReader for this request.

FromQueryRequest(ExecuteSqlRequest)

public static ReadOrQueryRequest FromQueryRequest(ExecuteSqlRequest request)

Creates a new ReadOrQueryRequest from an ExecuteSqlRequest.

Parameter
NameDescription
requestExecuteSqlRequest

The request to wrap in a generic ReadOrQueryRequest

Returns
TypeDescription
ReadOrQueryRequest

A new ReadOrQueryRequest that wraps the given request

FromReadRequest(ReadRequest)

public static ReadOrQueryRequest FromReadRequest(ReadRequest request)

Creates a new ReadOrQueryRequest from an ReadRequest.

Parameter
NameDescription
requestReadRequest

The request to wrap in a generic ReadOrQueryRequest

Returns
TypeDescription
ReadOrQueryRequest

A new ReadOrQueryRequest that wraps the given request

GetCallSettings(SpannerSettings)

public CallSettings GetCallSettings(SpannerSettings spannerSettings)

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

Parameter
NameDescription
spannerSettingsSpannerSettings

The SpannerSettings to extract the CallSettings from

Returns
TypeDescription
CallSettings

The CallSettings to use for the request

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

ToByteString()

public ByteString ToByteString()

Returns a ByteString representation of this request.

Returns
TypeDescription
ByteString

ToPartitionReadOrQueryRequest(long?, long?)

public PartitionReadOrQueryRequest ToPartitionReadOrQueryRequest(long? partitionSizeBytes, long? maxPartitions)

Creates a PartitionReadOrQueryRequest from a ReadOrQueryRequest.

Parameters
NameDescription
partitionSizeByteslong
maxPartitionslong
Returns
TypeDescription
PartitionReadOrQueryRequest

A new PartitionReadOrQueryRequest with the properties of the given request