Notes/db.go

14 lines
253 B
Go
Raw Permalink Normal View History

2024-03-28 21:49:48 +01:00
package main
import (
// Standard
"database/sql"
)
// Queryable can take both a Db and a transaction
type Queryable interface {
Exec(string, ...any) (sql.Result, error)
Query(string, ...any) (*sql.Rows, error)
QueryRow(string, ...any) *sql.Row
}