Class: Google::Apis::FirestoreV1::ReadWrite
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1::ReadWrite
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firestore_v1/classes.rb,
lib/google/apis/firestore_v1/representations.rb,
lib/google/apis/firestore_v1/representations.rb
Overview
Options for a transaction that can be used to read and write documents.
Instance Attribute Summary collapse
-
#concurrency_mode ⇒ String
Optional.
-
#retry_transaction ⇒ String
An optional transaction to retry.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReadWrite
constructor
A new instance of ReadWrite.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ReadWrite
Returns a new instance of ReadWrite.
4103 4104 4105 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 4103 def initialize(**args) update!(**args) end |
Instance Attribute Details
#concurrency_mode ⇒ String
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.
Corresponds to the JSON property concurrencyMode
4095 4096 4097 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 4095 def concurrency_mode @concurrency_mode end |
#retry_transaction ⇒ String
An optional transaction to retry.
Corresponds to the JSON property retryTransaction
NOTE: Values are automatically base64 encoded/decoded in the client library.
4101 4102 4103 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 4101 def retry_transaction @retry_transaction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4108 4109 4110 4111 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 4108 def update!(**args) @concurrency_mode = args[:concurrency_mode] if args.key?(:concurrency_mode) @retry_transaction = args[:retry_transaction] if args.key?(:retry_transaction) end |