Module batch (3.55.0)

Context manager for Cloud Spanner batched writes.

Classes

Batch

Batch(session)

Accumulate mutations for transmission duringcommit.

MutationGroup

MutationGroup(session,mutations=[])

A container for mutations.

Clients should use xref_MutationGroups toobtain instances instead of directly creating instances.

Parameters
NameDescription
sessionSession

The session used to perform the commit.

mutationslist

The list into which mutations are to be accumulated.

MutationGroups

MutationGroups(session)

Accumulate mutation groups for transmission duringbatch_write.

Parameter
NameDescription
sessionSession

the session used to perform the commit

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-18 UTC.