Documentation ¶
Index ¶
- func CtxWithTransaction(ctx context.Context, tx pgx.Tx) context.Context
- type Querier
- type TxPool
- func (t *TxPool) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error)
- func (t *TxPool) Pool() *pgxpool.Pool
- func (t *TxPool) Querier(ctx context.Context) Querier
- func (t *TxPool) Query(ctx context.Context, sql string, optionsAndArgs ...any) (pgx.Rows, error)
- func (t *TxPool) QueryRow(ctx context.Context, sql string, optionsAndArgs ...any) pgx.Row
- func (t *TxPool) Transaction(ctx context.Context, f func(ctx context.Context) error) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TxPool ¶
type TxPool struct {
// contains filtered or unexported fields
}
TxPool is a wrapper for pgxpool.Pool which can accept optional transactions through context.Context.
func (*TxPool) Querier ¶
Querier returns a transaction if it is present in context. Otherwise, returns the underlying pgxpool.Pool.
Click to show internal directories.
Click to hide internal directories.