mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-04-20 16:40:29 +00:00
14 lines
452 B
Go
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)
|
|
}
|