Class: Google::Apis::DatastoreV1::TransactionOptions
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::DatastoreV1::TransactionOptions
 
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/datastore_v1/classes.rb,
 generated/google/apis/datastore_v1/representations.rb,
 generated/google/apis/datastore_v1/representations.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.
Instance Attribute Summary collapse
- 
  
    
      #read_only  ⇒ Google::Apis::DatastoreV1::ReadOnly 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Options specific to read-only transactions. 
- 
  
    
      #read_write  ⇒ Google::Apis::DatastoreV1::ReadWrite 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Options specific to read / write transactions. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ TransactionOptions 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of TransactionOptions. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TransactionOptions
Returns a new instance of TransactionOptions
| 2060 2061 2062 | # File 'generated/google/apis/datastore_v1/classes.rb', line 2060 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#read_only ⇒ Google::Apis::DatastoreV1::ReadOnly
Options specific to read-only transactions.
Corresponds to the JSON property readOnly
| 2053 2054 2055 | # File 'generated/google/apis/datastore_v1/classes.rb', line 2053 def read_only @read_only end | 
#read_write ⇒ Google::Apis::DatastoreV1::ReadWrite
Options specific to read / write transactions.
Corresponds to the JSON property readWrite
| 2058 2059 2060 | # File 'generated/google/apis/datastore_v1/classes.rb', line 2058 def read_write @read_write end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 2065 2066 2067 2068 | # File 'generated/google/apis/datastore_v1/classes.rb', line 2065 def update!(**args) @read_only = args[:read_only] if args.key?(:read_only) @read_write = args[:read_write] if args.key?(:read_write) end |