package db import "database/sql" // DBTX is an interface satisfied by both *sql.DB and *sql.Tx. // All query functions in this package accept DBTX to allow callers // to choose whether operations run in a transaction or standalone. type DBTX interface { Exec(query string, args ...any) (sql.Result, error) Query(query string, args ...any) (*sql.Rows, error) QueryRow(query string, args ...any) *sql.Row Prepare(query string) (*sql.Stmt, error) }