Documentation ¶ Index ¶ Variables type Driver func New(pool *pgxpool.Pool) *Driver func (d *Driver) Begin(ctx context.Context) (context.Context, error) func (*Driver) Commit(ctx context.Context) error func (*Driver) Rollback(ctx context.Context) error func (*Driver) Tx(ctx context.Context, def Tx) Tx type Tx Constants ¶ This section is empty. Variables ¶ View Source var ErrNoTx = errors.New("no transaction in progress") Functions ¶ This section is empty. Types ¶ type Driver ¶ type Driver struct { // contains filtered or unexported fields } func New ¶ func New(pool *pgxpool.Pool) *Driver func (*Driver) Begin ¶ func (d *Driver) Begin(ctx context.Context) (context.Context, error) func (*Driver) Commit ¶ func (*Driver) Commit(ctx context.Context) error func (*Driver) Rollback ¶ func (*Driver) Rollback(ctx context.Context) error func (*Driver) Tx ¶ func (*Driver) Tx(ctx context.Context, def Tx) Tx type Tx ¶ added in v1.1.0 type Tx interface { Exec( ctx context.Context, sql string, arguments ...any, ) (commandTag pgconn.CommandTag, err error) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row } Source Files ¶ View all Source files driver.gotx.go Click to show internal directories. Click to hide internal directories.