Class: Google::Apis::SpannerV1::ExecuteBatchDmlRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/spanner_v1/classes.rb,
generated/google/apis/spanner_v1/representations.rb,
generated/google/apis/spanner_v1/representations.rb

Overview

The request for ExecuteBatchDml.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ExecuteBatchDmlRequest

Returns a new instance of ExecuteBatchDmlRequest



913
914
915
# File 'generated/google/apis/spanner_v1/classes.rb', line 913

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#seqnoFixnum

A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution. Corresponds to the JSON property seqno

Returns:

  • (Fixnum)


894
895
896
# File 'generated/google/apis/spanner_v1/classes.rb', line 894

def seqno
  @seqno
end

#statementsArray<Google::Apis::SpannerV1::Statement>

The list of statements to execute in this batch. Statements are executed serially, such that the effects of statement i are visible to statement i+1. Each statement must be a DML statement. Execution stops at the first failed statement; the remaining statements are not executed. Callers must provide at least one statement. Corresponds to the JSON property statements



903
904
905
# File 'generated/google/apis/spanner_v1/classes.rb', line 903

def statements
  @statements
end

#transactionGoogle::Apis::SpannerV1::TransactionSelector

This message is used to select the transaction in which a Read or ExecuteSql call runs. See TransactionOptions for more information about transactions. Corresponds to the JSON property transaction



911
912
913
# File 'generated/google/apis/spanner_v1/classes.rb', line 911

def transaction
  @transaction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



918
919
920
921
922
# File 'generated/google/apis/spanner_v1/classes.rb', line 918

def update!(**args)
  @seqno = args[:seqno] if args.key?(:seqno)
  @statements = args[:statements] if args.key?(:statements)
  @transaction = args[:transaction] if args.key?(:transaction)
end