Documentation
¶
Index ¶
Constants ¶
View Source
const TxConnKey = "txConn"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GormTxManager ¶
type GormTxManager struct {
// contains filtered or unexported fields
}
func (*GormTxManager) WithTransaction ¶
func (g *GormTxManager) WithTransaction(parentCtx context.Context, txfn TxFn) (err error)
WithTransaction creates a new transaction and handles rollback/commit based on the error object returned by the `TxFn`
type GormV2TxManager ¶ added in v0.1.1
type GormV2TxManager struct {
// contains filtered or unexported fields
}
func (*GormV2TxManager) WithTransaction ¶ added in v0.1.1
func (g *GormV2TxManager) WithTransaction(parentCtx context.Context, txfn TxFn) (err error)
type TxManager ¶
func NewGormTxManager ¶ added in v0.1.1
NewGormTxManager create TxManagerGormV2 with dbv2
func StartTxManager ¶
StartTxManager create TxManager with db
Click to show internal directories.
Click to hide internal directories.