Documentation ¶
Index ¶
- Variables
- func GetCurrentMigrationVersion(db DB, appName string) (int, error)
- func MigrateAll(db DB, appName string, migrations []Migration) error
- func Scalar[T any](db DB, sql string, args ...any) (T, error)
- type DB
- func (db DB) IsNotFound(err error) bool
- func (db DB) MustExec(sql string, args ...any)
- func (_ DB) Placeholder(i int) string
- func (db DB) RowToMap(sql string, args ...any) (typed.Typed, error)
- func (db DB) RowsToMap(sql string, args ...any) ([]typed.Typed, error)
- func (db DB) TableExists(tableName string) (bool, error)
- func (db DB) Transaction(fn func(tx pgx.Tx) error) error
- type Migrate
- type Migration
- type Row
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRows = pgx.ErrNoRows ErrMoreThanOneRow = errors.New("Result contained more than 1 row") )
Functions ¶
Types ¶
type DB ¶
func (DB) IsNotFound ¶
func (DB) Placeholder ¶
Exists for our test factory which are designed to work with different databases
func (DB) Transaction ¶
Click to show internal directories.
Click to hide internal directories.