This commit is contained in:
kzkzzzz
2025-03-22 01:24:57 +08:00
parent 197476e805
commit 7e0bf82418
22 changed files with 2291 additions and 919 deletions

17
mymysql/option.go Normal file
View File

@@ -0,0 +1,17 @@
package mymysql
import "gorm.io/gorm"
type Opt func(m *MysqlDb)
func WithDisablePing(v bool) Opt {
return func(m *MysqlDb) {
m.disablePing = v
}
}
func WithGormConfig(v *gorm.Config) Opt {
return func(m *MysqlDb) {
m.gormConfig = v
}
}