Documentation ¶
Index ¶
- func Begin(ctx context.Context, db *gorm.DB, opts ...*sql.TxOptions) context.Context
- func DB(ctx context.Context) *gorm.DB
- func HandleCommit(ctx context.Context, hook pkg.Hook)
- func HandleRollback(ctx context.Context, hook pkg.Hook)
- func Run[T any](ctx context.Context, txFunc func(ctx context.Context, db *gorm.DB) (T, error), ...) (res T, err error)
- func Setup(conn func() (*gorm.DB, error), opt ...*sql.TxOptions) (*gorm.DB, error)
- func With[T any](ctx context.Context, f func(ctx context.Context, db *gorm.DB) (T, error), ...) (T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.