Skip to content

refactor: delegate transaction handling to plugin drivers#220

Merged
datlechin merged 2 commits intomainfrom
refactor/transaction-delegation
Mar 9, 2026
Merged

refactor: delegate transaction handling to plugin drivers#220
datlechin merged 2 commits intomainfrom
refactor/transaction-delegation

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Each plugin driver now owns its transaction SQL instead of the adapter hardcoding BEGIN/COMMIT/ROLLBACK
  • PluginDriverAdapter delegates to pluginDriver.beginTransaction() / commitTransaction() / rollbackTransaction()
  • MySQL overrides with START TRANSACTION, MSSQL with BEGIN TRANSACTION, Oracle with no-op (implicit transactions)
  • MongoDB marks supportsTransactions: false (Redis already has MULTI/EXEC support)
  • Removed DatabaseType.beginTransactionSQL — transaction knowledge lives in plugins
  • Removed default transaction implementation from DatabaseDriver extension
  • All call sites (DatabaseManager, coordinators, ImportService) use protocol methods instead of raw SQL strings

Test plan

  • Build succeeds
  • All tests pass
  • Verify MySQL connection can save row edits (uses START TRANSACTION)
  • Verify PostgreSQL transaction wrapping still works (uses BEGIN)
  • Verify SQL Server transaction wrapping works (uses BEGIN TRANSACTION)
  • Verify Oracle operations work without explicit BEGIN
  • Verify Redis MULTI/EXEC still works
  • Verify ClickHouse/MongoDB operations work without transactions

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin datlechin merged commit eec73fe into main Mar 9, 2026
2 checks passed
@datlechin datlechin deleted the refactor/transaction-delegation branch March 9, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant