Class: Google::Apis::FirestoreV1::ReadWrite

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReadWrite

Returns a new instance of ReadWrite.



4102
4103
4104
# File 'lib/google/apis/firestore_v1/classes.rb', line 4102

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)


4094
4095
4096
# File 'lib/google/apis/firestore_v1/classes.rb', line 4094

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)


4100
4101
4102
# File 'lib/google/apis/firestore_v1/classes.rb', line 4100

def retry_transaction
  @retry_transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4107
4108
4109
4110
# File 'lib/google/apis/firestore_v1/classes.rb', line 4107

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