Documentation
¶
Index ¶
- func ConnectDB(dsn string) (db *gorm.DB, err error)
- func GetClientDbTX(ctx iris.Context, clientId string) (tx *gorm.DB)
- func GetCustomDbTxByDbName(ctx iris.Context, name string) (tx *gorm.DB)
- func GetDbByName(key string) (db *gorm.DB)
- func GetDbMap() map[string]*gorm.DB
- func GetDbTxObjByDbName(ctx iris.Context, name string) (tx *gorm.DB)
- func GetMasterDbTx(ctx iris.Context) (tx *gorm.DB)
- func Init(app *iris.Application)
- func SetDbMap(key string, db *gorm.DB)
- func TransactionHandler(ctx iris.Context, err interface{})
- type GormLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientDbTX ¶
func GetCustomDbTxByDbName ¶
func GetDbTxObjByDbName ¶
func GetMasterDbTx ¶
func TransactionHandler ¶
func TransactionHandler(ctx iris.Context, err interface{})
Types ¶
type GormLogger ¶
type GormLogger struct{}
GormLogger 自定义Gorm日志结构体
func (*GormLogger) Printf ¶
func (*GormLogger) Printf(format string, v ...interface{})
Printf 自定义格式打印Gorm日志
Click to show internal directories.
Click to hide internal directories.