DATA-DOG / go-txdb

Immutable transaction isolated sql driver for golang
Other
667 stars 48 forks source link

How to use with pgxpool? #68

Closed hotrush closed 2 months ago

hotrush commented 2 months ago

Any hint much appreciated

flimzy commented 2 months ago

go-txdb only works with database/sql drivers. pgxpool does not use this interface. pgx does provide a compatibility layer for database/sql, but as far as I'm aware, that's completely independent from pgxpool, since database/sql handles its own pool.

peterldowns commented 1 month ago

@hotrush you might want to take a look at my project pgtestdb — the pgtestdb.Custom() method will let you create a new test database, then connect to it with pgxpool.

hotrush commented 1 month ago

@peterldowns thanks for the hint, already switched to it. Much better than txdb 👍