spanner-jdbc: Step 23 - DmlBatch #5908
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds DmlBatch. DML batches are similar to DDL batches, except they execute DML instead of DDL statements. DML batches are executed like this:
An active batch can be aborted by executing the
ABORT BATCHstatement.DML batches can be executed while the transaction is in autocommit mode, which means that the effects of the batch will be visible to all other users directly after the
RUN BATCHstatement has finished executing. DML batches can also be executed as part of a read/write transaction. As a connection only allows oneUnitOfWorkto be active at any time, and both a read/write transaction and a DML batch is aUnitOfWork, the DML batch is executed as an nested batch of the active transaction. WhenRUN BATCHis executed, the batch of DML statements are executed on the active read/write transaction, and its effects will only be visible to other users once the transaction has been committed.