Class BatchCheckout (3.60.0)

BatchCheckout(
 database,
 request_options=None,
 max_commit_delay=None,
 exclude_txn_from_change_streams=False,
 isolation_level=IsolationLevel.ISOLATION_LEVEL_UNSPECIFIED,
 read_lock_mode=ReadLockMode.READ_LOCK_MODE_UNSPECIFIED,
 **kw
)

Context manager for using a batch from a database.

Inside the context manager, checks out a session from the database, creates a batch from it, making the batch available.

Caller must not use the batch to perform API requests outside the scope of the context manager.

Parameters

Name Description
database Database

database to use

request_options RequestOptions

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

max_commit_delay datetime.timedelta

(Optional) The amount of latency this request is willing to incur in order to improve throughput.

Methods

__enter__

__enter__()

Begin with block.

__exit__

__exit__(exc_type, exc_val, exc_tb)

End with block.

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年12月16日 UTC.