Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MYSQL ¶
type MYSQL struct { Name string `json:"name"` // 数据库名称 Password string `json:"password"` // 数据库密码 User string `json:"user"` // 数据库用户 Host string `json:"host"` // host Port string `json:"port"` // 端口 TablePrefix string `json:"table_prefix"` // 表前缀 ParseTime string `json:"parseTime"` // 时间修改 Loc string `json:"loc"` // defult Local }
*
- MYSQL
- 默认PG的配置文件
func (*MYSQL) NewConnection ¶
*
- NewConnection
- 创建链接
- dsn := "user:pass@tcp(127.0.0.1:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local"
Click to show internal directories.
Click to hide internal directories.