Versions in this module Expand all Collapse all v1 v1.0.2 Mar 30, 2025 v1.0.1 Mar 14, 2025 v1.0.0 Mar 10, 2025 Changes in this version + var ErrNoRows = pgx.ErrNoRows + var ErrTooManyRows = pgx.ErrTooManyRows + var ErrTxClosed = pgx.ErrTxClosed + var ErrTxCommitRollback = pgx.ErrTxCommitRollback + type Batch = pgx.Batch + type BatchResults = pgx.BatchResults + type Client interface + RegisterTypes func(types []string) error + ToPgx func() *pgxpool.Pool + func New(ctx context.Context, cfg *Config) (Client, error) + func NewWithMock(pool Pool) Client + func NewWithPool(ctx context.Context, pool *pgxpool.Pool) (Client, error) + type Config struct + DBName string + Host string + MigrationsPath string + MigrationsRun bool + Password string + Port int + SSLMode string + Username string + type Conn = pgx.Conn + type CopyFromSource = pgx.CopyFromSource + type Identifier = pgx.Identifier + type Pool interface + Acquire func(ctx context.Context) (c *pgxpool.Conn, err error) + AcquireAllIdle func(ctx context.Context) []*pgxpool.Conn + AcquireFunc func(ctx context.Context, f func(*pgxpool.Conn) error) error + Begin func(ctx context.Context) (pgx.Tx, error) + BeginTx func(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) + Close func() + Config func() *pgxpool.Config + CopyFrom func(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error) + Exec func(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error) + Ping func(ctx context.Context) error + Query func(ctx context.Context, sql string, args ...any) (pgx.Rows, error) + QueryRow func(ctx context.Context, sql string, args ...any) pgx.Row + Reset func() + SendBatch func(ctx context.Context, b *pgx.Batch) pgx.BatchResults + Stat func() *pgxpool.Stat + type Row = pgx.Row + type Rows = pgx.Rows + type Stat = pgxpool.Stat + type Tx = pgx.Tx + type TxOptions = pgx.TxOptions Other modules containing this package github.com/gosuit/pg/v2