Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@olavloite
Copy link

Adds DdlBatch. A DdlBatch can be used to execute a set of DDL statements as one batch. A DDL batch is not atomic, and it could be that only some of the statements will succeed. DdlBatch is implemented as a UnitOfWork on a connection, and there can only be one UnitOfWork active at any time on a connection. This means that when a connection is executing a DDL batch, it will not be executing any other transaction, and only DDL statements are allowed.

A DDL batch can be executed both through calling specific methods on a connection instance, as well as by using the auxiliary SQL statements START BATCH DDL and RUN BATCH / ABORT BATCH.

@olavloite olavloite requested a review from kolea2 July 29, 2019 06:08
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 29, 2019
@olavloite olavloite force-pushed the spanner-jdbc-22-ddl-batch branch from 95c3551 to 0ded7c8 Compare July 30, 2019 07:28
@olavloite olavloite requested a review from kolea2 July 30, 2019 07:29
// Return metadata.
return operation.getMetadata().get();
} catch (Exception e) {
UpdateDatabaseDdlMetadata metadata = operation.getMetadata().get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's extract into a private method - computeUpdateCounts?

@olavloite olavloite merged commit 22c5908 into googleapis:spanner-jdbc Jul 30, 2019
olavloite added a commit to olavloite/google-cloud-java that referenced this pull request Aug 5, 2019
* add DdlBatch

* return successful/failed DDL statements

* extracted update count extraction to a separate method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants