Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

olavloite
Copy link
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 team as code owners February 13, 2025 16:10
@product-auto-label product-auto-label bot 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-statement Feb 13, 2025
7 of 26 checks passed
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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants