Documentation ¶
Index ¶
- func ExecTrans(ctx context.Context, db *gorm.DB, fn TransFunc) error
- func ExecTransWithLock(ctx context.Context, db *gorm.DB, fn TransFunc) error
- func GetDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- func GetDBWithModel(ctx context.Context, defDB *gorm.DB, m interface{}) *gorm.DB
- type Trans
- type TransFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecTransWithLock ¶
ExecTransWithLock 执行事务(加锁)
Types ¶
Click to show internal directories.
Click to hide internal directories.