Documentation
¶
Index ¶
- func Begin(ctx context.Context) (context.Context, transaction)
- func Do(ctx context.Context, f func(ctx context.Context) error) (err error)
- func Enable(db db) dbtx
- func ForceTx(ctx context.Context, db DBTX, f func(context.Context, TX) error) (err error)
- func IsActive(ctx context.Context) bool
- type DBTX
- type TX
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBTX ¶
type DBTX interface {
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}
Click to show internal directories.
Click to hide internal directories.