Cloud Firestore V1beta1 Client - Class TransactionOptions (1.40.0)

Reference documentation and code samples for the Cloud Firestore V1beta1 Client class TransactionOptions.

Options for creating a new transaction.

Generated from protobuf message google.firestore.v1beta1.TransactionOptions

Namespace

Google \ Cloud \ Firestore \ V1beta1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ read_only Google\Cloud\Firestore\V1beta1\TransactionOptions\PBReadOnly

The transaction can only be used for read operations.

↳ read_write Google\Cloud\Firestore\V1beta1\TransactionOptions\ReadWrite

The transaction can be used for both read and write operations.

getReadOnly

The transaction can only be used for read operations.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\TransactionOptions\PBReadOnly|null

hasReadOnly

setReadOnly

The transaction can only be used for read operations.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\TransactionOptions\PBReadOnly
Returns
TypeDescription
$this

getReadWrite

The transaction can be used for both read and write operations.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\TransactionOptions\ReadWrite|null

hasReadWrite

setReadWrite

The transaction can be used for both read and write operations.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\TransactionOptions\ReadWrite
Returns
TypeDescription
$this

getMode

Returns
TypeDescription
string