pool

package
v6.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggerName       = "pgx-pool"
	DriverLoggerName = "postgres-driver"
)

Variables

View Source
var (
	ErrUnsupportedParam        = errors.New("unsupported parameter")
	ErrInvalidExecModeForParam = errors.New(
		"parameter is valid only with specific default_query_exec_mode",
	)
)

Functions

func ParseConfig

func ParseConfig(
	driverConfig *config.DriverConfig,
	logger *zap.Logger,
) (*pgxpool.Config, error)

func WithRoutineIsolation added in v6.4.0

func WithRoutineIsolation(ctx context.Context, isolation config.TxIsolationLevel) context.Context

Types

type PoolX

type PoolX struct {
	*pgxpool.Pool
	// contains filtered or unexported fields
}

func NewPool

func NewPool(
	ctx context.Context,
	driverConfig *config.DriverConfig,
	logger *zap.Logger,
) (*PoolX, error)

func NewWithConfig

func NewWithConfig(ctx context.Context, pgConfig *pgxpool.Config) (*PoolX, error)

func (*PoolX) Close added in v6.3.3

func (p *PoolX) Close()

func (*PoolX) ExecContext

func (p *PoolX) ExecContext(
	ctx context.Context,
	sql string,
	args ...any,
) (pgconn.CommandTag, error)

func (*PoolX) QueryContext

func (p *PoolX) QueryContext(ctx context.Context, sql string, args ...any) (pgx.Rows, error)

Jump to

Keyboard shortcuts

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