Reference documentation and code samples for the Cloud Firestore V1 Client class ReadWrite.
Options for a transaction that can be used to read and write documents.
Generated from protobuf message google.firestore.v1.TransactionOptions.ReadWrite
Namespace
Google \ Cloud \ Firestore \ V1 \ TransactionOptionsMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ retry_transaction |
string
An optional transaction to retry. |
↳ concurrency_mode |
int
Optional. The concurrency control mode to use for this transaction. A database is able to use different concurrency modes for different transactions simultaneously. 3rd party auth requests are only allowed to create optimistic read-write transactions and must specify that here even if the database-level setting is already configured to optimistic. |
getRetryTransaction
An optional transaction to retry.
| Returns | |
|---|---|
| Type | Description |
string |
|
setRetryTransaction
An optional transaction to retry.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getConcurrencyMode
Optional. The concurrency control mode to use for this transaction.
A database is able to use different concurrency modes for different transactions simultaneously. 3rd party auth requests are only allowed to create optimistic read-write transactions and must specify that here even if the database-level setting is already configured to optimistic.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type ConcurrencyMode. |
setConcurrencyMode
Optional. The concurrency control mode to use for this transaction.
A database is able to use different concurrency modes for different transactions simultaneously. 3rd party auth requests are only allowed to create optimistic read-write transactions and must specify that here even if the database-level setting is already configured to optimistic.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type ConcurrencyMode. |
| Returns | |
|---|---|
| Type | Description |
$this |
|