Class: Google::Apis::FirestoreV1beta1::ReadWrite

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firestore_v1beta1/classes.rb,
lib/google/apis/firestore_v1beta1/representations.rb,
lib/google/apis/firestore_v1beta1/representations.rb

Overview

Options for a transaction that can be used to read and write documents.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReadWrite

Returns a new instance of ReadWrite.



2584
2585
2586
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2584

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#concurrency_modeString

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

Returns:

  • (String)


2576
2577
2578
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2576

def concurrency_mode
  @concurrency_mode
end

#retry_transactionString

An optional transaction to retry. Corresponds to the JSON property retryTransaction NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2582
2583
2584
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2582

def retry_transaction
  @retry_transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2589
2590
2591
2592
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2589

def update!(**args)
  @concurrency_mode = args[:concurrency_mode] if args.key?(:concurrency_mode)
  @retry_transaction = args[:retry_transaction] if args.key?(:retry_transaction)
end