Skip to content

refactor: assemble main transaction session in MainTx#4967

Merged
steve-chavez merged 1 commit into
PostgREST:mainfrom
mkleczek:push-ywxtvxtrroqo
May 31, 2026
Merged

refactor: assemble main transaction session in MainTx#4967
steve-chavez merged 1 commit into
PostgREST:mainfrom
mkleczek:push-ywxtvxtrroqo

Conversation

@mkleczek
Copy link
Copy Markdown
Collaborator

@mkleczek mkleczek commented May 31, 2026

This change makes the API surface between MainTx and App smaller.

Currently, App reconstructs a database transaction by unpacking the isolation
level, transaction mode, DbHandler, and transaction runner returned by MainTx.
That exposes MainTx internals at the call site even though MainTx already owns
query setup, execution, decoding, and rollback behavior.

The goal is to keep transaction assembly in MainTx while App remains responsible
for pool execution, database error mapping, and response orchestration. DbTx now
carries the assembled SQL session, and App passes that session directly to the
connection pool.

@mkleczek mkleczek force-pushed the push-ywxtvxtrroqo branch from e3dc7ef to 4d8a8fa Compare May 31, 2026 06:34
This change makes the API surface between MainTx and App smaller.

Currently, App reconstructs a database transaction by unpacking the isolation
level, transaction mode, DbHandler, and transaction runner returned by MainTx.
That exposes MainTx internals at the call site even though MainTx already owns
query setup, execution, decoding, and rollback behavior.

The goal is to keep transaction assembly in MainTx while App remains responsible
for pool execution, database error mapping, and response orchestration. DbTx now
carries the assembled SQL session, and App passes that session directly to the
connection pool.
@mkleczek mkleczek force-pushed the push-ywxtvxtrroqo branch from 4d8a8fa to f422afe Compare May 31, 2026 19:24
@steve-chavez steve-chavez merged commit 0df56f9 into PostgREST:main May 31, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants