# Cloud Spanner API - Class Google::Cloud::Spanner::BatchWriteResults (v2.36.0)

2.36.0 (latest) 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.1 2.18.1 2.17.0 2.16.1 2.15.0 2.14.0 2.13.0 2.12.1 2.11.0 Reference documentation and code samples for the Cloud Spanner API class Google::Cloud::Spanner::BatchWriteResults.

Results of a batch write.


This is a stream of [BatchResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner/latest/Google-Cloud-Spanner-BatchWriteResults-BatchResult "Google::Cloud::Spanner::BatchWriteResults::BatchResult (class)") objects, each of
which represents a set of mutation groups applied together.

<br />

Use the Ruby Enumerable module to iterate over the results.

## Inherits

- Object

## Includes

- Enumerable

## Methods

### #each

    def each()

Iterate over the results.
**Yields**

- ([::Google::Cloud::Spanner::BatchWriteResults::BatchResult](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-spanner/latest/Google-Cloud-Spanner-BatchWriteResults-BatchResult))

### #error?

    def error?() -> ::Boolean

Whether at least one mutation group encountered an error.
**Returns**

- (::Boolean)

### #ok?

    def ok?() -> ::Boolean

Whether all mutation groups were successful.
**Returns**

- (::Boolean)

### #successful_indexes

    def successful_indexes() -> ::Array<::Integer>

A list of the indexes of successful mutation groups.
**Returns**

- (::Array\<::Integer\>)