[PECOBLR-1156] Add foundational structures for transaction support#299
Open
[PECOBLR-1156] Add foundational structures for transaction support#299
Conversation
Add core infrastructure for Multi-Statement Transaction (MST) support: - Add autoCommit bool field to conn struct for client-side state caching - Create tx struct implementing driver.Tx interface - Add transaction error constants (Begin, Commit, Rollback, Nested, UnsupportedIsolation) - Initialize autoCommit to true in connector (default state) This implements the foundational structures defined in the MST design document, following the JDBC implementation pattern with client-side autocommit caching. Part of Epic: PECOBLR-1144 (MST Support in GoLang driver) Design: DESIGN_MULTI_STATEMENT_TRANSACTIONS.md Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
jadewang-db
previously approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement foundational infrastructure for Multi-Statement Transaction (MST) support in the Go driver, adding core structures and error constants needed for transaction implementation.
Changes
autoCommit boolfield toconnstruct for client-side state cachingtxstruct withconn *connfield implementingdriver.TxinterfaceErrTransactionBegin- "failed to begin transaction"ErrTransactionCommit- "failed to commit transaction"ErrTransactionRollback- "failed to rollback transaction"ErrTransactionNested- "transaction already in progress"ErrUnsupportedIsolation- "unsupported transaction isolation level"autoCommit = truein connector (default state)Testing
go build ./...)go vet ./...)JIRA
Closes PECOBLR-1156
Part of Story: PECOBLR-1155
Part of Epic: PECOBLR-1144
Design Document
See
DESIGN_MULTI_STATEMENT_TRANSACTIONS.mdfor complete technical design.This implementation follows Section 3.1 (tx struct), Section 4.1 (autoCommit field), Section 4.2 (initialization), and Section 5.1 (error constants).
Implementation Notes
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com