Versions in this module Expand all Collapse all v0 v0.0.0 Mar 21, 2023 Changes in this version + type Db struct + func New(ctx context.Context, host, port, user, password, db string, opts ...Option) *Db + func (d *Db) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) + func (d *Db) Close() + func (d *Db) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error) + func (d *Db) Ping(ctx context.Context) error + func (d *Db) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + func (d *Db) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row + type Option func(db *Db) + func WithConnectionTimeout(timeout time.Duration) Option + func WithHealthCheckPeriod(period time.Duration) Option + func WithLogLevel(loglevel pgx.LogLevel) Option + func WithLogger(logger pgx.Logger) Option + func WithMaxConnections(maxConnections int32) Option + func WithTLSConfig(tlsConf *tls.Config) Option