Class: Google::Cloud::Spanner::BatchWriteResults::BatchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/spanner/batch_write_results.rb

Overview

Result of a set of mutation groups applied together.

Instance Method Summary collapse

Instance Method Details

#commit_timestamp::Time

The timestamp of the commit.

Returns:

  • (::Time)


80
81
82
# File 'lib/google/cloud/spanner/batch_write_results.rb', line 80

def commit_timestamp
  Convert.timestamp_to_time @grpc.commit_timestamp
end

#error?::Boolean

Whether these mutation groups were unsuccessful.

Returns:

  • (::Boolean)


71
72
73
# File 'lib/google/cloud/spanner/batch_write_results.rb', line 71

def error?
  !ok?
end

#indexes::Array<::Integer>

The indexes of the mutation groups applied together.

Returns:

  • (::Array<::Integer>)


44
45
46
# File 'lib/google/cloud/spanner/batch_write_results.rb', line 44

def indexes
  @grpc.indexes.to_a
end

#ok?::Boolean

Whether these mutation groups were successful.

Returns:

  • (::Boolean)


62
63
64
# File 'lib/google/cloud/spanner/batch_write_results.rb', line 62

def ok?
  status.code.zero?
end

#status::Google::Rpc::Status

The result of this set of mutation groups.

Returns:

  • (::Google::Rpc::Status)


53
54
55
# File 'lib/google/cloud/spanner/batch_write_results.rb', line 53

def status
  @grpc.status
end