Google Cloud Spanner v1 API - Class ReadOrQueryRequest (5.0.0-beta03)

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

Google.Cloud.Spanner.V1

Assembly

Google.Cloud.Spanner.V1.dll

Properties

DataBoostEnabled

public bool DataBoostEnabled { get; set; }
Property Value
Type Description
bool

DirectedReadOptions

public DirectedReadOptions DirectedReadOptions { get; set; }
Property Value
Type Description
DirectedReadOptions

ExecuteSqlRequest

public ExecuteSqlRequest ExecuteSqlRequest { get; }

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

Property Value
Type Description
ExecuteSqlRequest

IsQuery

public bool IsQuery { get; }

True if this is query, and false otherwise.

Property Value
Type Description
bool

IsRead

public bool IsRead { get; }

True if this is a read, and false otherwise.

Property Value
Type Description
bool

PartitionToken

public ByteString PartitionToken { get; set; }
Property Value
Type Description
ByteString

ReadRequest

public ReadRequest ReadRequest { get; }

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

Property Value
Type Description
ReadRequest

ResumeToken

public ByteString ResumeToken { set; }
Property Value
Type Description
ByteString

Session

public string Session { get; }

See Session and Session

Property Value
Type Description
string

SessionAsSessionName

public SessionName SessionAsSessionName { set; }

See Session and Session

Property Value
Type Description
SessionName

Transaction

public TransactionSelector Transaction { get; set; }
Property Value
Type Description
TransactionSelector

Methods

CloneRequest()

public ReadOrQueryRequest CloneRequest()

See Clone() and Clone()

Returns
Type Description
ReadOrQueryRequest

ExecuteReadOrQueryStreamReader(PooledSession, CallSettings)

public ReliableStreamReader ExecuteReadOrQueryStreamReader(PooledSession session, CallSettings callSettings)

Creates a ReliableStreamReader for this request

Parameters
Name Description
session PooledSession

The session to use for the request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ReliableStreamReader

A ReliableStreamReader for this request.

FromQueryRequest(ExecuteSqlRequest)

public static ReadOrQueryRequest FromQueryRequest(ExecuteSqlRequest request)

Creates a new ReadOrQueryRequest from an ExecuteSqlRequest.

Parameter
Name Description
request ExecuteSqlRequest

The request to wrap in a generic ReadOrQueryRequest

Returns
Type Description
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
Name Description
request ReadRequest

The request to wrap in a generic ReadOrQueryRequest

Returns
Type Description
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
Name Description
spannerSettings SpannerSettings

The SpannerSettings to extract the CallSettings from

Returns
Type Description
CallSettings

The CallSettings to use for the request

GetHashCode()

public override int GetHashCode()
Returns
Type Description
int
Overrides

ToByteString()

public ByteString ToByteString()

Returns a ByteString representation of this request.

Returns
Type Description
ByteString

ToPartitionReadOrQueryRequest(long?, long?)

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

Creates a PartitionReadOrQueryRequest from a ReadOrQueryRequest.

Parameters
Name Description
partitionSizeBytes long
maxPartitions long
Returns
Type Description
PartitionReadOrQueryRequest

A new PartitionReadOrQueryRequest with the properties of the given request