Versions in this module Expand all Collapse all v1 v1.0.0 Jan 26, 2020 Changes in this version + type Config struct + AfterConnect func(context.Context, *pgx.Conn) error + AfterRelease func(*pgx.Conn) bool + BeforeAcquire func(context.Context, *pgx.Conn) bool + ConnConfig *pgx.ConnConfig + CredentialsProvider CredentialsProvider + HealthCheckPeriod time.Duration + MaxConnLifetime time.Duration + MaxConns int32 + func ParseConfig(connString string) (*Config, error) + type Conn struct + func (c *Conn) Begin(ctx context.Context) (pgx.Tx, error) + func (c *Conn) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) + func (c *Conn) Conn() *pgx.Conn + func (c *Conn) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error) + func (c *Conn) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) + func (c *Conn) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + func (c *Conn) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row + func (c *Conn) Release() + func (c *Conn) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults + type CredentialsProvider interface + GetCredentials func() (username string, password string, err error) + type Pool struct + func Connect(ctx context.Context, connString string) (*Pool, error) + func ConnectConfig(ctx context.Context, config *Config) (*Pool, error) + func (p *Pool) Acquire(ctx context.Context) (*Conn, error) + func (p *Pool) AcquireAllIdle(ctx context.Context) []*Conn + func (p *Pool) Begin(ctx context.Context) (pgx.Tx, error) + func (p *Pool) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) + func (p *Pool) Close() + func (p *Pool) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error) + func (p *Pool) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) + func (p *Pool) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + func (p *Pool) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row + func (p *Pool) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults + func (p *Pool) Stat() *Stat + type Stat struct + func (s *Stat) AcquireCount() int64 + func (s *Stat) AcquireDuration() time.Duration + func (s *Stat) AcquiredConns() int32 + func (s *Stat) CanceledAcquireCount() int64 + func (s *Stat) ConstructingConns() int32 + func (s *Stat) EmptyAcquireCount() int64 + func (s *Stat) IdleConns() int32 + func (s *Stat) MaxConns() int32 + func (s *Stat) TotalConns() int32 + type Tx struct + func (tx *Tx) Begin(ctx context.Context) (pgx.Tx, error) + func (tx *Tx) Commit(ctx context.Context) error + func (tx *Tx) Conn() *pgx.Conn + func (tx *Tx) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error) + func (tx *Tx) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) + func (tx *Tx) LargeObjects() pgx.LargeObjects + func (tx *Tx) Prepare(ctx context.Context, name, sql string) (*pgconn.StatementDescription, error) + func (tx *Tx) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + func (tx *Tx) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row + func (tx *Tx) Rollback(ctx context.Context) error + func (tx *Tx) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults Other modules containing this package github.com/viroll/dynamicpgxpool/v2