Python client library  |  Google Cloud (original) (raw)

Stay organized with collections Save and categorize content based on your preferences.

Batch API

Context manager for Cloud Spanner batched writes.

class google.cloud.spanner_v1.batch.Batch(session)

Bases: google.cloud.spanner_v1.batch._BatchBase

Accumulate mutations for transmission during commit().

_ enter_()

Begin with block.

_ exit_(exc_type, exc_val, exc_tb)

End with block.

commit(return_commit_stats=False, request_options=None)

Commit mutations to the database.

commit_stats( = Non )

Timestamp at which the batch was successfully committed.

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

Last updated 2025-05-02 UTC.