Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

chore: method for adding returning clause to statements#1311

Merged
olavloite merged 3 commits intomainfrom
add-returning-clause-to-statements
Aug 14, 2023
Merged

chore: method for adding returning clause to statements#1311
olavloite merged 3 commits intomainfrom
add-returning-clause-to-statements

Conversation

@olavloite
Copy link
Copy Markdown
Collaborator

Adds a method to JdbcStatement for appending a THEN RETURN/RETURNING clause to the statement. This will be used to modify statements that request generated keys to be returned.

Adds a method to JdbcStatement for appending a THEN RETURN/RETURNING
clause to the statement. This will be used to modify statements that
request generated keys to be returned.
@olavloite olavloite requested a review from a team August 11, 2023 18:27
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner-jdbc API. labels Aug 11, 2023
@olavloite olavloite requested a review from rajatbhatta August 13, 2023 15:20
return statement;
}
if (generatedKeysColumns.size() == 1
&& Objects.equals(generatedKeysColumns.get(0), ALL_COLUMNS.get(0))) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
&& Objects.equals(generatedKeysColumns.get(0), ALL_COLUMNS.get(0))) {
&& generatedKeysColumns.get(0).equals(ALL_COLUMNS.get(0))) {

Comment thread src/main/java/com/google/cloud/spanner/jdbc/JdbcStatement.java Outdated
Comment thread src/test/java/com/google/cloud/spanner/jdbc/JdbcStatementTest.java
@olavloite olavloite requested a review from rajatbhatta August 14, 2023 14:29
@olavloite olavloite merged commit 1953ea2 into main Aug 14, 2023
@olavloite olavloite deleted the add-returning-clause-to-statements branch August 14, 2023 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/java-spanner-jdbc API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants