pgxmigrate

package
v0.0.0-...-ccee039 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pgxmigrate provides a migrate.DB adapter for pgx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(q Querier) migrate.DB

NewDriver wraps a pgx Querier (typically *pgxpool.Pool or *pgx.Conn) to satisfy the migrate.DB interface.

Types

type Querier

type Querier interface {
	Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error)
	Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
	Begin(ctx context.Context) (pgx.Tx, error)
}

Querier is the subset of pgx methods used by the migrator. Both *pgxpool.Pool and *pgx.Conn satisfy this interface.

Jump to

Keyboard shortcuts

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