Cloud Datastore V1 Client - Class TransactionOptions (2.0.2)

Namespace

Google \ Cloud \ Datastore \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ read_writeTransactionOptions\ReadWrite

The transaction should allow both reads and writes.

↳ read_onlyTransactionOptions\PBReadOnly

The transaction should only allow reads.

getReadWrite

The transaction should allow both reads and writes.

Returns
TypeDescription
TransactionOptions\ReadWrite|null

hasReadWrite

setReadWrite

The transaction should allow both reads and writes.

Parameter
NameDescription
varTransactionOptions\ReadWrite
Returns
TypeDescription
$this

getReadOnly

The transaction should only allow reads.

Returns
TypeDescription
TransactionOptions\PBReadOnly|null

hasReadOnly

setReadOnly

The transaction should only allow reads.

Parameter
NameDescription
varTransactionOptions\PBReadOnly
Returns
TypeDescription
$this

getMode

Returns
TypeDescription
string

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 2026-01-24 UTC.