Documentation ¶
Index ¶
- func ModelToMap(m Model) map[string]any
- func ModelToMapWithTag(m Model, tag string) map[string]any
- func NewMysqlDB(cfg *DatabaseConfig) (*gorm.DB, error)
- func NewMysqlDBByDsn(dsn string, cfg *ConnConfig, l logger.Interface) (*gorm.DB, error)
- func SetCallBacks(db *gorm.DB, callbacks ...Callback) error
- type Callback
- type ConnConfig
- type DatabaseConfig
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModelToMap ¶ added in v1.21.7
func ModelToMapWithTag ¶ added in v1.25.7
func NewMysqlDB ¶
func NewMysqlDB(cfg *DatabaseConfig) (*gorm.DB, error)
func NewMysqlDBByDsn ¶ added in v1.25.8
Types ¶
type Callback ¶
type ConnConfig ¶ added in v1.25.8
type DatabaseConfig ¶
Click to show internal directories.
Click to hide internal directories.