Versions in this module Expand all Collapse all v0 v0.2.0 Oct 15, 2025 v0.1.0 Oct 14, 2025 Changes in this version + func CheckHealth(ctx context.Context, db *Pool) error + func MustCommit(ctx context.Context, tx Transaction) + func MustRollback(ctx context.Context, tx Transaction) + func WithTransaction(ctx context.Context, pool *Pool, fn TransactionFunc) error + type Database interface + Exec func(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error) + Query func(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + QueryRow func(ctx context.Context, sql string, args ...interface{}) pgx.Row + type Pool struct + func NewPool(ctx context.Context, cfg config.DatabaseConfig) (*Pool, error) + func (p *Pool) Begin(ctx context.Context) (Transaction, error) + func (p *Pool) Check(ctx context.Context) error + func (p *Pool) Close() + func (p *Pool) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error) + func (p *Pool) HealthCheck(ctx context.Context) error + func (p *Pool) Ping(ctx context.Context) error + func (p *Pool) PingWithTimeout(ctx context.Context, timeout time.Duration) 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) Stats() *pgxpool.Stat + func (p *Pool) WithTransaction(ctx context.Context, fn TransactionFunc) error + type PoolInterface interface + Begin func(ctx context.Context) (pgx.Tx, error) + Close func() + Exec func(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error) + Ping func(ctx context.Context) error + Query func(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + QueryRow func(ctx context.Context, sql string, args ...interface{}) pgx.Row + Stat func() *pgxpool.Stat + type Transaction interface + Commit func(ctx context.Context) error + Rollback func(ctx context.Context) error + func BeginTransaction(ctx context.Context, pool *Pool) (Transaction, error) + type TransactionFunc func(tx Transaction) error