You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to use transactions without pgx? #302
I have a project with bun sql and I would like to insert a job as part of a transaction, but I can only use pgx.Tx transactions. Also I can use sql.Tx but the driver does not support this
Hey guys, could you tell me what underlying driver you're using to power database/sql in general? Do you use lib/pq or is it database/sql + Pgx, or something else like Bun's Postgres driver?
Currently, we consider only pgx to be a viable driver. We switch old apps from lib/pq. And bun native driver has some problems that we don't have using pgx.
If anybody out there is interested in giving this a try, database/sql functionality was merged in #351. We still haven't cut an official release with it (should come in v0.10.0) nor have we finished documentation on it, but the actual support has been merged.
Reacted by Igor Zibarev, Danny Hermes and Geert-Johan Riemer
Activity
brandur commentedon Apr 16, 2024
Not currently — I have a branch where this almost works, but it's going to take a little more work still. I think I'll get this sooner than later.
mrkaspa commentedon Apr 16, 2024
@brandur great to hear that, hope to use that feature soon
hypnoglow commentedon Apr 18, 2024
We also use bun and would love to see support for
bun.Txand/orsql.Tx. Otherwise it seems impossible to integrate with existing transactions.brandur commentedon Apr 19, 2024
Okay, good to know. Going to try and get to this pretty soon.
mrkaspa commentedon Apr 19, 2024
I think with bun you can use the sql.Tx transactions since bun.Tx is a wrapper for sql.Tx, btw I am using bun as well
brandur commentedon May 5, 2024
Hey guys, could you tell me what underlying driver you're using to power
database/sqlin general? Do you uselib/pqor is itdatabase/sql+ Pgx, or something else like Bun's Postgres driver?hypnoglow commentedon May 5, 2024
Hey @brandur
Currently, we consider only
pgxto be a viable driver. We switch old apps fromlib/pq. Andbunnative driver has some problems that we don't have usingpgx.brandur commentedon May 5, 2024
Excellent, that's helpful. Thanks Igor.
dhermes commentedon May 6, 2024
Chiming in here! We are currently using
database/sqlwithgithub.com/jackc/pgx/v5/stdlibas the actual driver.Fully functional `database/sql` driver
brandur commentedon May 12, 2024
Opened #351. We'll need some additional docs, but it make use of River with Bun possible.
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver
ewhauser commentedon May 18, 2024
We use
lib/pqwithsqlcand would love to see River working with it. Happy to do some legworkewhauser commentedon May 18, 2024
Actually, ignore this request. Sounds like after some research it's better that we just migrate over to
pgxanyways.brandur commentedon May 19, 2024
This one's pretty close in that there's a working driver in #351, but yes, you should definitely switch to pgx anyway.
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver
Fully functional `database/sql` driver (#351)
bgentry commentedon Jul 7, 2024
If anybody out there is interested in giving this a try,
database/sqlfunctionality was merged in #351. We still haven't cut an official release with it (should come in v0.10.0) nor have we finished documentation on it, but the actual support has been merged.bgentry commentedon Jul 26, 2024
This was officially shipped last week: https://riverqueue.com/blog/database-sql
Please let us know if you run into any issues with it!
hypnoglow commentedon Sep 20, 2024
Hey @bgentry
I found that docs about drivers are now outdated, without database/sql not mentioned. https://riverqueue.com/docs/database-drivers