Class Batch

Accumulate mutations for transmission during commit.

Inheritance

builtins.object > google.cloud.spanner_v1._helpers._SessionWrapper > google.cloud.spanner_v1.batch._BatchBase > Batch

Methods

__enter__

__enter__()

Begin with block.

__exit__

__exit__(exc_type, exc_val, exc_tb)

End with block.

commit

commit(return_commit_stats=False, request_options=None)

Commit mutations to the database.

Parameters
NameDescription
return_commit_stats bool

If true, the response will return commit stats which can be accessed though commit_stats.

request_options RequestOptions

(Optional) Common options for this request. If a dict is provided, it must be of the same form as the protobuf message RequestOptions.

Returns
TypeDescription
datetimetimestamp of the committed changes.