go-txdb icon indicating copy to clipboard operation
go-txdb copied to clipboard

Consider supporting the sql.Connector interface

Open flimzy opened this issue 4 years ago • 1 comments

If this package were to satisfy the driver.Connector interface, it would no longer be necessary to register a driver for every new instance, which could make certain test patterns much simpler.

I'd be happy to submit a PR if it's likely to be accepted.

flimzy avatar Apr 08 '21 07:04 flimzy

Hi, that would be very welcome, thanks!

l3pp4rd avatar Apr 09 '21 04:04 l3pp4rd

Hey! This is the new way to write sql drivers, and I need I would need this to wrap txdb inside my own wrapper (adding retrial functionality, for example).

See:

https://pkg.go.dev/database/sql/driver

The driver interface has evolved over time. Drivers should implement Connector and DriverContext interfaces.

Any reason why #41 development stopped? Can we recover it somehow?

lopezator avatar Nov 22 '23 14:11 lopezator