Class ReadOrQueryRequest (3.14.0)

public sealed class ReadOrQueryRequest

Class for common properties of ReadRequest and ExecuteSqlRequest.

Inheritance

Object > ReadOrQueryRequest

Namespace

Google.Cloud.Spanner.V1

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
Boolean

IsRead

public bool IsRead { get; }

True if this is a read, and false otherwise.

Property Value
TypeDescription
Boolean

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
Int32
Overrides

ToByteString()

public ByteString ToByteString()

Returns a ByteString representation of this request.

Returns
TypeDescription
ByteString

ToPartitionReadOrQueryRequest(Nullable<Int64>, Nullable<Int64>)

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

Creates a PartitionReadOrQueryRequest from a ReadOrQueryRequest.

Parameters
NameDescription
partitionSizeBytesNullable<Int64>
maxPartitionsNullable<Int64>
Returns
TypeDescription
PartitionReadOrQueryRequest

A new PartitionReadOrQueryRequest with the properties of the given request