class Google::Cloud::Spanner::BatchUpdateError

# BatchUpdateError

Includes the cause and the partial result set of row counts from a failed batch DML operation. Contains a cause error that provides service error type and message, and a list with the exact number of rows that were modified for each successful statement before the error.

See {Google::Cloud::Spanner::Transaction#batch_update}.

@attr_reader [Array<Integer>] row_counts A list with the exact number of

rows that were modified for each successful statement.

Attributes

row_counts[R]

Public Class Methods

from_grpc(grpc) click to toggle source

@private New Status from a Google::Rpc::Status object.

# File lib/google/cloud/spanner/errors.rb, line 89
def self.from_grpc grpc
  row_counts = grpc.result_sets.map do |rs|
    rs.stats.row_count_exact
  end
  new.tap do |result|
    result.instance_variable_set :@row_counts, row_counts
  end
end