Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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-statementgoogleapis/java-spanner:last-statementfrom
sgorse123:mainsgorse123/java-spanner:mainCopy head branch name to clipboard
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-statementgoogleapis/java-spanner:last-statementfrom
sgorse123:mainsgorse123/java-spanner:mainCopy head branch name to clipboard

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 team 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
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.