Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDatabaseIfNotExists ¶ added in v2.1.18
CreateDatabaseIfNotExists 自动创建数据库
在 Go 项目中优雅的使用 gorm v2
https://segmentfault.com/a/1190000039097157
Types ¶
type Config ¶ added in v2.1.17
type Config struct { DsnConfig Log LogConfig `json:"log" yaml:"log"` Pool PoolConfig `json:"pool" yaml:"pool"` }
type DsnConfig ¶
type DsnConfig struct { UserName string `json:"userName" yaml:"userName"` Password string `json:"password,optional" yaml:"password"` // Host e.g."127.0.0.1:3306" Host string `json:"host" yaml:"host"` DBName string `json:"dbName" yaml:"dbName"` }
func (*DsnConfig) ToDsnString ¶ added in v2.2.10
Click to show internal directories.
Click to hide internal directories.