Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting the sql.Connector interface #40

Closed
flimzy opened this issue Apr 8, 2021 · 2 comments · Fixed by #41
Closed

Consider supporting the sql.Connector interface #40

flimzy opened this issue Apr 8, 2021 · 2 comments · Fixed by #41

Comments

@flimzy
Copy link
Collaborator

flimzy commented Apr 8, 2021

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.

@l3pp4rd
Copy link
Member

l3pp4rd commented Apr 9, 2021

Hi, that would be very welcome, thanks!

@lopezator
Copy link

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?

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 a pull request may close this issue.

3 participants