File tree 4 files changed +1725
-78
lines changed
4 files changed +1725
-78
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ type DsnProvider interface {
14
14
15
15
// GeneralDB 也被 Pgsql 和 Mysql 原样使用
16
16
type GeneralDB struct {
17
- Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"`
18
- Port string `mapstructure:"port" json:"port" yaml:"port"`
19
- Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
20
- Dbname string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` // 数据库名
21
- Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库密码
22
- Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
23
- Path string `mapstructure:"path" json:"path" yaml:"path"`
17
+ Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` // 数据库前缀
18
+ Port string `mapstructure:"port" json:"port" yaml:"port"` // 数据库端口
19
+ Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
20
+ Dbname string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` // 数据库名
21
+ Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库账号
22
+ Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
23
+ Path string `mapstructure:"path" json:"path" yaml:"path"` // 数据库地址
24
24
Engine string `mapstructure:"engine" json:"engine" yaml:"engine" default:"InnoDB"` // 数据库引擎,默认InnoDB
25
25
LogMode string `mapstructure:"log-mode" json:"log-mode" yaml:"log-mode"` // 是否开启Gorm全局日志
26
26
MaxIdleConns int `mapstructure:"max-idle-conns" json:"max-idle-conns" yaml:"max-idle-conns"` // 空闲中的最大连接数
You can’t perform that action at this time.
0 commit comments