Class ProjectsResource.InstancesResource.DatabasesResource.SessionsResource.CommitRequest
Commits a transaction. The request includes the mutations to be applied to rows in the database.
Commit
might return an ABORTED
error. This can occur at any time; commonly, the cause is
conflicts with concurrent transactions. However, it can also happen for a variety of other
reasons. If Commit
returns ABORTED
, the caller should re-attempt the transaction from the
beginning, re-using the same session. On very rare occasions, Commit
might return UNKNOWN
.
This can happen, for example, if the client job experiences a 1+ hour networking failure. At
that point, Cloud Spanner has lost track of the transaction outcome and we recommend that you
perform another read from the database to see the state of things as they are now.
Inheritance
Inherited Members
Namespace: Google.Apis.Spanner.v1
Assembly: Google.Apis.Spanner.v1.dll
Syntax
public class ProjectsResource.InstancesResource.DatabasesResource.SessionsResource.CommitRequest : SpannerBaseServiceRequest<CommitResponse>, IClientServiceRequest<CommitResponse>, IClientServiceRequest
Constructors
CommitRequest(IClientService, CommitRequest, string)
Constructs a new Commit request.
Declaration
public CommitRequest(IClientService service, CommitRequest body, string session)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
CommitRequest | 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 transaction to be committed is running.
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 Commit parameter list.
Declaration
protected override void InitParameters()