Files
at-container-registry/pkg/appview/db/dbtx.go
2026-02-10 20:58:24 -06:00

14 lines
452 B
Go

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)
}