Documentation ¶
Index ¶
- func Core() *gorm.DB
- func DB(name string) *gorm.DB
- func DoInitModels(imfs ...InitModelFunc) error
- func DoInitModelsWithDB(db *gorm.DB, imfs ...InitModelWithDBFunc) error
- func InitModel(db *gorm.DB, models ...interface{}) error
- func InitMutilMySQL(dburls map[string]string) error
- func InitMySQL(name, dburl string) (*gorm.DB, error)
- func InitSQLite(name, dburl string) (*gorm.DB, error)
- func InsertOrUpdate(db *gorm.DB, v interface{}, columns ...string) error
- func Std() *gorm.DB
- type InitModelFunc
- type InitModelWithDBFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoInitModelsWithDB ¶ added in v0.3.3
func DoInitModelsWithDB(db *gorm.DB, imfs ...InitModelWithDBFunc) error
DoInitModelsWithDB 使用db参数初始化模型
func InitMutilMySQL ¶
Types ¶
type InitModelFunc ¶
type InitModelFunc func() error
type InitModelWithDBFunc ¶ added in v0.3.3
Click to show internal directories.
Click to hide internal directories.