Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRecordNotFound returns a "record not found error". Occurs only when attempting to query the database with a struct; querying with a slice won't return this error ErrRecordNotFound = gorm.ErrRecordNotFound )
Functions ¶
Types ¶
type Config ¶
type Config struct { DBName string //数据库名称 User string //用户名 Password string //密码 Adds string //连接地址 Debug bool //是否开启 mysql debug Charset string //字符集 (默认 utf8) ConnMaxLifetime int //设置连接可重用的最大时间量 MaxIdleConns int //设置连接池空闲时的最大连接数 MaxOpenConns int //设置数据库的最大打开连接数 SingularTable bool //关闭复数表名,如果设置为true,`User`表的表名就会是`user`,而不是`users` gorm.Config }
Click to show internal directories.
Click to hide internal directories.