Class ProjectsResource.InstancesResource.DatabasesResource.SessionsResource.BatchWriteRequest
Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or if you use generated or commit timestamp-based keys, it may result in additional rows being added to the mutation's table. We recommend structuring your mutation groups to be idempotent to avoid this issue.
Inheritance
Inherited Members
Namespace: Google.Apis.Spanner.v1
Assembly: Google.Apis.Spanner.v1.dll
Syntax
public class ProjectsResource.InstancesResource.DatabasesResource.SessionsResource.BatchWriteRequest : SpannerBaseServiceRequest<BatchWriteResponse>, IClientServiceRequest<BatchWriteResponse>, IClientServiceRequest
Constructors
BatchWriteRequest(IClientService, BatchWriteRequest, string)
Constructs a new BatchWrite request.
Declaration
public BatchWriteRequest(IClientService service, BatchWriteRequest body, string session)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
BatchWriteRequest | body | |
string | session |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Session
Required. The session in which the batch request is to be run.
Declaration
[RequestParameter("session", RequestParameterType.Path)]
public virtual string Session { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes BatchWrite parameter list.
Declaration
protected override void InitParameters()