Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Default *gorm.DB //默认数据库
)
Functions ¶
func AddMapBatch ¶
func AddMapBatch(batch map[string]interface{})
Types ¶
type Option ¶
type Option struct { DSN string `json:"dsn"` //数据源 Driver string `json:"driver"` //驱动,mysql、postgres、sqlite、sqlserver、clickhouse,默认mysql MaxOpenConn int `json:"max_open_conn"` //打开连接的最大数量,默认100 MaxIdleConn int `json:"max_idle_conn"` //空闲连接的最大数量,默认10 LogLevel int `json:"log_level"` //Silent 1、Error 2、Warn 3、Info 4,默认3 SlowThreshold int `json:"slow_threshold"` //慢SQL阈值,单位秒,默认1 }
Click to show internal directories.
Click to hide internal directories.