TransactionSelector

This message is used to select the transaction in which asessions.read orExecuteSql call runs.

SeeTransactionOptions for more information about transactions.

JSON representation
{// Union fieldselector can be only one of the following:"singleUse":{object (TransactionOptions)},"id":string,"begin":{object (TransactionOptions)}// End of list of possible types for union fieldselector.}
Fields
Union fieldselector. If no fields are set, the default is a single use transaction with strong concurrency.selector can be only one of the following:
singleUse

object (TransactionOptions)

Execute the read or SQL query in a temporary transaction. This is the most efficient way to execute a transaction that consists of a single SQL query.

id

string (bytes format)

Execute the read or SQL query in a previously-started transaction.

A base64-encoded string.

begin

object (TransactionOptions)

Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned inResultSetMetadata.transaction, which is aTransaction.

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-12-12 UTC.