public sealed class ReadOrQueryRequest
Class for common properties of ReadRequest and ExecuteSqlRequest.
Namespace
Google.Cloud.Spanner.V1Assembly
Google.Cloud.Spanner.V1.dll
Properties
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 |
Boolean |
IsRead
public bool IsRead { get; }
True if this is a read, and false otherwise.
Property Value | |
---|---|
Type | Description |
Boolean |
PartitionToken
public ByteString PartitionToken { get; set; }
See PartitionToken and PartitionToken
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; }
See ResumeToken and ResumeToken
Property Value | |
---|---|
Type | Description |
ByteString |
Session
public string Session { get; }
Property Value | |
---|---|
Type | Description |
String |
SessionAsSessionName
public SessionName SessionAsSessionName { set; }
Property Value | |
---|---|
Type | Description |
SessionName |
Transaction
public TransactionSelector Transaction { set; }
See Transaction and Transaction
Property Value | |
---|---|
Type | Description |
TransactionSelector |
Methods
CloneRequest()
public ReadOrQueryRequest CloneRequest()
See Google.Cloud.Spanner.V1.ReadRequest.Clone and Google.Cloud.Spanner.V1.ExecuteSqlRequest.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 |
Int32 |
ToByteString()
public ByteString ToByteString()
Returns a ByteString representation of this request.
Returns | |
---|---|
Type | Description |
ByteString |
ToPartitionReadOrQueryRequest(Nullable<Int64>, Nullable<Int64>)
public PartitionReadOrQueryRequest ToPartitionReadOrQueryRequest(long? partitionSizeBytes, long? maxPartitions)
Creates a PartitionReadOrQueryRequest from a ReadOrQueryRequest.
Parameters | |
---|---|
Name | Description |
partitionSizeBytes | Nullable<Int64> |
maxPartitions | Nullable<Int64> |
Returns | |
---|---|
Type | Description |
PartitionReadOrQueryRequest | A new PartitionReadOrQueryRequest with the properties of the given request |