pgxrouter

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*poolConfig)

Option configures the Pool behaviour.

func WithRetryOnError

func WithRetryOnError(fn func(error) bool) Option

type Pool

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

func New

func New(main, read *pgxpool.Pool, opts ...Option) *Pool

func (*Pool) Close

func (p *Pool) Close()

func (*Pool) Exec

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

func (*Pool) MainPool

func (p *Pool) MainPool() *pgxpool.Pool

func (*Pool) Query

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

func (*Pool) QueryRow

func (p *Pool) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row

func (*Pool) ReadPool

func (p *Pool) ReadPool() *pgxpool.Pool

func (*Pool) Reset

func (p *Pool) Reset()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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