Documentation
¶
Index ¶
- Variables
- func AfterCommit(ctx context.Context, hook func(context.Context) error) error
- func RequireTx(ctx context.Context) (*gorm.DB, error)
- func TxFromContext(ctx context.Context) (*gorm.DB, bool)
- func WithContext(ctx context.Context, db *gorm.DB) *gorm.DB
- func WithTx(ctx context.Context, tx *gorm.DB) context.Context
- type TxOptions
- type UnitOfWork
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrActiveTransactionRequired = errors.New("gorm active transaction required") )
Functions ¶
Types ¶
type UnitOfWork ¶
type UnitOfWork struct {
// contains filtered or unexported fields
}
func NewUnitOfWork ¶
func NewUnitOfWork(db *gorm.DB) *UnitOfWork
func (*UnitOfWork) WithinTransaction ¶
Click to show internal directories.
Click to hide internal directories.