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

feat: add missing methods #941

Open TheSench opened 2 months ago

TheSench commented 2 months ago

This PR adds some missing methods to flesh out interfaces and make DB and Tx have more of a shared interface.

This opens up the possibility of creating a common interface that represents either one so that functions can be written that execute queries without needing to know if they're being run within a transaction or not.

šŸ“Œ Long-term (future PR), I'd like to create an interface (or a few) that represent the remaining shared query-related methods, and then one interface that represents either a DB or Tx. These are the additional methods not represented in another interface right now: