Closed bshaffer closed 2 weeks ago
Ensures excludeTxnFromChangeStreams is configurable for the following methods, and adds tests:
excludeTxnFromChangeStreams
Additionally, ensures excludeTxnFromChangeStreams is NOT configurable for the following methods, and adds tests:
$database->runTransaction(function (Transaction $t) use ($sql) { // Run a query }, [ 'transactionOptions' => ['excludeTxnFromChangeStreams' => true] ]);
$database->executePartitionedUpdate($sql, [ 'transactionOptions' => ['excludeTxnFromChangeStreams' => true] ]);
$transaction = $operation->transaction($this->session, [ 'transactionOptions' => ['excludeTxnFromChangeStreams' => true] ]);
$operation->execute($this->session, $sql, [ 'transaction' => ['begin' => ['excludeTxnFromChangeStreams' => true]] ]);
$operation->executeUpdate($this->session, $transaction, $sql, [ 'transaction' => ['begin' => ['excludeTxnFromChangeStreams' => true]] ]);
$database->batchWrite($mutationGroups, [ 'excludeTxnFromChangeStreams' => true ]);
Attempting to call Transaction::executeUpdate with the following options will throw an exception:
Transaction::executeUpdate
// The following throws a `Google\ApiCore\ValidationException`: $transaction->executeUpdate($sql, [ 'transaction' => ['begin' => ['excludeTxnFromChangeStreams' => true]] ]);
Ensures
excludeTxnFromChangeStreams
is configurable for the following methods, and adds tests:Additionally, ensures
excludeTxnFromChangeStreams
is NOT configurable for the following methods, and adds tests:Database::runTransaction
Database::executePartitionedUpdate
Operation::transaction
Operation::execute
Operation::executeUpdate
Database::batchWrite
Transaction::executeUpdate
Attempting to call
Transaction::executeUpdate
with the following options will throw an exception: