Class: Google::Cloud::Datastore::V1::TransactionOptions

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/datastore/v1/datastore.rb

Overview

Options for beginning a new transaction.

Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests.

Defined Under Namespace

Classes: ReadOnly, ReadWrite

Instance Attribute Summary collapse

Instance Attribute Details

#read_only::Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly

Returns The transaction should only allow reads.

Returns:



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'proto_docs/google/datastore/v1/datastore.rb', line 487

class TransactionOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Options specific to read / write transactions.
  # @!attribute [rw] previous_transaction
  #   @return [::String]
  #     The transaction identifier of the transaction being retried.
  class ReadWrite
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Options specific to read-only transactions.
  # @!attribute [rw] read_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Reads entities at the given time.
  #     This may not be older than 60 seconds.
  class ReadOnly
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#read_write::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite

Returns The transaction should allow both reads and writes.

Returns:



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'proto_docs/google/datastore/v1/datastore.rb', line 487

class TransactionOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Options specific to read / write transactions.
  # @!attribute [rw] previous_transaction
  #   @return [::String]
  #     The transaction identifier of the transaction being retried.
  class ReadWrite
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Options specific to read-only transactions.
  # @!attribute [rw] read_time
  #   @return [::Google::Protobuf::Timestamp]
  #     Reads entities at the given time.
  #     This may not be older than 60 seconds.
  class ReadOnly
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end