Versions in this module Expand all Collapse all v3 v3.0.0 Feb 27, 2023 Changes in this version + var ErrEmptyDatabase = errors.New("no database connection is set") + type ConfigFunc func(*PGX) + func GracePeriod(delay time.Duration) ConfigFunc + func Retry(attempts int, delay time.Duration) ConfigFunc + func WithRetry(r retry.Retry) ConfigFunc + type PGX struct + func NewPGX(conn Pool, conf ...ConfigFunc) (*PGX, error) + func (p *PGX) Transaction(ctx context.Context, fns ...func(pgx.Tx) error) error + type Pool interface + Begin func(ctx context.Context) (pgx.Tx, error) + type Tx interface + Commit func() error + Exec func(query string, args ...any) (sql.Result, error) + ExecContext func(ctx context.Context, query string, args ...any) (sql.Result, error) + Prepare func(query string) (*sql.Stmt, error) + PrepareContext func(ctx context.Context, query string) (*sql.Stmt, error) + Query func(query string, args ...any) (*sql.Rows, error) + QueryContext func(ctx context.Context, query string, args ...any) (*sql.Rows, error) + QueryRow func(query string, args ...any) *sql.Row + QueryRowContext func(ctx context.Context, query string, args ...any) *sql.Row + Rollback func() error + Stmt func(stmt *sql.Stmt) *sql.Stmt + StmtContext func(ctx context.Context, stmt *sql.Stmt) *sql.Stmt Other modules containing this package github.com/arsham/dbtools github.com/arsham/dbtools/v2