Class: Google::Apis::SpannerV1::Transaction
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::SpannerV1::Transaction
 
 
- Includes:
 - Core::Hashable, Core::JsonObjectSupport
 
- Defined in:
 - lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb 
Overview
A transaction.
Instance Attribute Summary collapse
- 
  
    
      #id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
idmay be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or Rollback calls. - 
  
    
      #read_timestamp  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
For snapshot read-only transactions, the read timestamp chosen for the transaction.
 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ Transaction 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Transaction.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Constructor Details
#initialize(**args) ⇒ Transaction
Returns a new instance of Transaction.
      4354 4355 4356  | 
    
      # File 'lib/google/apis/spanner_v1/classes.rb', line 4354 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#id ⇒ String
id may be used to identify the transaction in subsequent Read, ExecuteSql,
Commit, or Rollback calls. Single-use read-only transactions do not have IDs,
because single-use transactions do not support multiple requests.
Corresponds to the JSON property id
NOTE: Values are automatically base64 encoded/decoded in the client library.
      4344 4345 4346  | 
    
      # File 'lib/google/apis/spanner_v1/classes.rb', line 4344 def id @id end  | 
  
#read_timestamp ⇒ String
For snapshot read-only transactions, the read timestamp chosen for the
transaction. Not returned by default: see TransactionOptions.ReadOnly.
return_read_timestamp. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to
nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
Corresponds to the JSON property readTimestamp
      4352 4353 4354  | 
    
      # File 'lib/google/apis/spanner_v1/classes.rb', line 4352 def @read_timestamp end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      4359 4360 4361 4362  | 
    
      # File 'lib/google/apis/spanner_v1/classes.rb', line 4359 def update!(**args) @id = args[:id] if args.key?(:id) @read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp) end  |