Documentation ¶
Index ¶
- type Transactional
- func (cls *Transactional) AddCommitHooks(hooks ...func(ctx context.Context))
- func (cls *Transactional) AddRollbackHooks(hooks ...func(ctx context.Context))
- func (cls *Transactional) Commit(ctx context.Context) error
- func (cls *Transactional) Rollback(ctx context.Context) error
- func (cls *Transactional) Session() *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transactional ¶
type Transactional struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *gorm.DB) *Transactional
func (*Transactional) AddCommitHooks ¶
func (cls *Transactional) AddCommitHooks(hooks ...func(ctx context.Context))
func (*Transactional) AddRollbackHooks ¶
func (cls *Transactional) AddRollbackHooks(hooks ...func(ctx context.Context))
func (*Transactional) Session ¶
func (cls *Transactional) Session() *gorm.DB
Click to show internal directories.
Click to hide internal directories.