Class: Google::Cloud::Firestore::V1::TransactionOptions
- Inherits:
-
Object
- Object
- Google::Cloud::Firestore::V1::TransactionOptions
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/firestore/v1/common.rb
Overview
Options for creating a new transaction.
Defined Under Namespace
Modules: ConcurrencyMode Classes: ReadOnly, ReadWrite
Instance Attribute Summary collapse
-
#read_only ⇒ ::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly
The transaction can only be used for read operations.
-
#read_write ⇒ ::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite
The transaction can be used for both read and write operations.
Instance Attribute Details
#read_only ⇒ ::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly
Returns The transaction can only be used for read operations.
Note: The following fields are mutually exclusive: read_only, read_write. If a field in that set is populated, all other fields in the set will automatically be cleared.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'proto_docs/google/firestore/v1/common.rb', line 69 class TransactionOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Options for a transaction that can be used to read and write documents. # @!attribute [rw] retry_transaction # @return [::String] # An optional transaction to retry. # @!attribute [rw] concurrency_mode # @return [::Google::Cloud::Firestore::V1::TransactionOptions::ConcurrencyMode] # 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. class ReadWrite include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Options for a transaction that can only be used to read documents. # @!attribute [rw] read_time # @return [::Google::Protobuf::Timestamp] # Reads documents at the given time. # # This must be a microsecond precision timestamp within the past one # hour, or if Point-in-Time Recovery is enabled, can additionally be a # whole minute timestamp within the past 7 days. class ReadOnly include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The type of concurrency control mode for transactions. module ConcurrencyMode # Start the transaction with the database-level default concurrency mode. CONCURRENCY_MODE_UNSPECIFIED = 0 # Use optimistic concurrency control for the new transaction. OPTIMISTIC = 1 # Use pessimistic concurrency control for the new transaction. PESSIMISTIC = 2 end end |
#read_write ⇒ ::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite
Returns The transaction can be used for both read and write operations.
Note: The following fields are mutually exclusive: read_write, read_only. If a field in that set is populated, all other fields in the set will automatically be cleared.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'proto_docs/google/firestore/v1/common.rb', line 69 class TransactionOptions include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Options for a transaction that can be used to read and write documents. # @!attribute [rw] retry_transaction # @return [::String] # An optional transaction to retry. # @!attribute [rw] concurrency_mode # @return [::Google::Cloud::Firestore::V1::TransactionOptions::ConcurrencyMode] # 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. class ReadWrite include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Options for a transaction that can only be used to read documents. # @!attribute [rw] read_time # @return [::Google::Protobuf::Timestamp] # Reads documents at the given time. # # This must be a microsecond precision timestamp within the past one # hour, or if Point-in-Time Recovery is enabled, can additionally be a # whole minute timestamp within the past 7 days. class ReadOnly include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The type of concurrency control mode for transactions. module ConcurrencyMode # Start the transaction with the database-level default concurrency mode. CONCURRENCY_MODE_UNSPECIFIED = 0 # Use optimistic concurrency control for the new transaction. OPTIMISTIC = 1 # Use pessimistic concurrency control for the new transaction. PESSIMISTIC = 2 end end |