jmoiron / sqlx

general purpose extensions to golang's database/sql
http://jmoiron.github.io/sqlx/
MIT License
16.3k stars 1.09k forks source link

GetContext not in any interface -- propose adding interface GetterContext #930

Open AllenKaplan opened 5 months ago

AllenKaplan commented 5 months ago

Hello, I have noticed that the connx method GetContext does not exist within an interface, nor is there any general interface for which connx implements

This has made it troublesome to mock connx for testing and using in code

Possibly we could also add an interface that defines a connection under something like the name Connector

What are your thoughts?