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.



2527
2528
2529
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2527

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)


2519
2520
2521
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2519

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)


2525
2526
2527
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2525

def retry_transaction
  @retry_transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2532
2533
2534
2535
# File 'lib/google/apis/firestore_v1beta1/classes.rb', line 2532

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