db

package
v0.61.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachDatabase

func ForEachDatabase(t *testing.T, fn func(db DB))

Types

type DB

type DB interface {
	Dialect() string

	Ping() error
	Close() error

	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}

func New

func New(config database.DatabaseConfig, logger log.Logger, options ...Option) (DB, func(), error)

type Option

type Option func(db *db) error

func MySQLRebind

func MySQLRebind() Option

func PostgresRebind

func PostgresRebind() Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL