Documentation
¶
Index ¶
- type 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 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(db *Db)
func WithConnectionTimeout ¶
func WithHealthCheckPeriod ¶
func WithLogLevel ¶
func WithLogger ¶
func WithMaxConnections ¶
func WithTLSConfig ¶
Click to show internal directories.
Click to hide internal directories.