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

feat: add option to indicate that a statement is the last in a transaction - #3644

Merged
olavloite merged 3 commits into
googleapis:last-statementfrom
sgorse123:main
Feb 13, 2025
Merged

feat: add option to indicate that a statement is the last in a transaction#3644
olavloite merged 3 commits into
googleapis:last-statementfrom
sgorse123:main

Conversation

@olavloite

Copy link
Copy Markdown
Collaborator

Adds an option to indicate that a SQL statement is the last in a read/write transaction. This allows Spanner to skip some verifications when executing the statement. The only allowed action after sending a statement with the option last_statement is a Commit or a Rollback.

@olavloite
olavloite requested review from a teamFebruary 13, 2025 16:10
@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Feb 13, 2025
@olavloite
olavloite merged commit f953f76 into googleapis:last-statementFeb 13, 2025
olavloite added a commit that referenced this pull request Feb 17, 2025
…ction (#3647)
* feat: add option to indicate that a statement is the last in a transaction (#3644)
* feat: Add LastStatement DML option
* Removing debugging changes
---------
Co-authored-by: Shirdon Gorse <shirdon@google.com>
* feat: set last_statement for autocommit statements
Automatically sets the last_statement option to true for DML statements that
are executed in autocommit=true mode.
* fix: add hashCode implementation
Add a hashCode implementation that ensures that it is in sync with
the equals method.
* chore: generate libraries at Fri Feb 14 08:41:45 UTC 2025
* fix: extract error details from SpannerException
---------
Co-authored-by: Shirdon Gorse <shirdon@google.com>
Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spannerIssues related to the googleapis/java-spanner API.size: mPull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@olavloite@sgorse12