Spanner/src/Database.php
public function insertOrUpdateBatch($table, array $dataSet, array $options = [])
    {
        $mutations = [];
        foreach ($dataSet as $data) {
            $mutations[] = $this->operation->mutation(Operation::OP_INSERT_OR_UPDATE, $table, $data);
        }

        return $this->commitInSingleUseTransaction($mutations, $options);
    }
public function insertOrUpdateBatch($table, array $dataSet, array $options = [])
    {
        $mutations = [];
        foreach ($dataSet as $data) {
            $mutations[] = $this->operation->mutation(Operation::OP_INSERT_OR_UPDATE, $table, $data);
        }

        return $this->commitInSingleUseTransaction($mutations, $options);
    }
public function insertOrUpdateBatch ( $ table , array $ dataSet , array $ options = [ ] ) { $ mutations = [ ] ; foreach ( $ dataSet as $ data ) { $ mutations [ ] = $ this -> operation -> mutation ( Operation :: OP_INSERT_OR_UPDATE , $ table , $ data ) ; } return $ this -> commitInSingleUseTransaction ( $ mutations , $ options ) ; }
Insert or update multiple rows.

If a row already exists (determined by comparing the Primary Key to
existing table data), the row will be updated. If not, it will be
created.

Mutations are committed in a single-use transaction.

Example:
```
$database->insertOrUpdateBatch('Posts', [
[
'ID' => 1337,
'postTitle' => 'Hello World!',
'postContent' => 'Thanks for visiting our site!'
], [
'ID' => 1338,
'postTitle' => 'Our History',
'postContent' => 'A little bit about us!'
]
]);
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/reference/rpc/google.spanner.v1#google.spanner.v1.CommitRequest CommitRequest
@codingStandardsIgnoreEnd

@param string $table The table to mutate.
@param array $dataSet The row data to insert or update.
@param array $options [optional] Configuration options.
@return Timestamp The commit Timestamp.
Insert or update multiple rows .