Skip to content

stdlib: Add the GetTxFromDriverTx method - #2615

Open
CyJaySong wants to merge 1 commit into
jackc:masterfrom
CyJaySong:feat/GetTxFromDriverTx
Open

stdlib: Add the GetTxFromDriverTx method#2615
CyJaySong wants to merge 1 commit into
jackc:masterfrom
CyJaySong:feat/GetTxFromDriverTx

Conversation

@CyJaySong

@CyJaySong CyJaySong commented Jul 29, 2026

Copy link
Copy Markdown

In the compatibility mode of the database/sql standard library, obtain pgx.Tx

@jackc

jackc commented Aug 1, 2026

Copy link
Copy Markdown
Owner

At first glance, the code seems fine. However, it should be tested. And is there some particular use case this enables?

@CyJaySong

CyJaySong commented Aug 1, 2026

Copy link
Copy Markdown
Author

At first glance, the code seems fine. However, it should be tested. And is there some particular use case this enables?

use case for river with bunbun uses pgx/stdlib to connect to the database, while river uses pgx. To ensure consistency, it is necessary to obtain pgx.Tx from the transaction of bun.Tx

I have already used it in a production environment. This code is simple enough, so I don't intend to write tests for it. It's unlikely to go wrong.

@CyJaySong

CyJaySong commented Aug 13, 2026

Copy link
Copy Markdown
Author

@jackc please

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.

2 participants