Options for beginning a new transaction.
Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] in read requests.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#read_only
def read_only() -> ::Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly
Returns
- (::Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly) — The transaction should only allow reads.
#read_only=
def read_only=(value) -> ::Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly
Parameter
- value (::Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly) — The transaction should only allow reads.
Returns
- (::Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly) — The transaction should only allow reads.
#read_write
def read_write() -> ::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite
Returns
- (::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite) — The transaction should allow both reads and writes.
#read_write=
def read_write=(value) -> ::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite
Parameter
- value (::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite) — The transaction should allow both reads and writes.
Returns
- (::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite) — The transaction should allow both reads and writes.