Documentation ¶
Index ¶
Constants ¶
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 // ErrInvalidTransaction occurs when you are trying to `Commit` or `Rollback` ErrInvalidTransaction = gorm.ErrInvalidTransaction )
Functions ¶
Types ¶
type Association ¶
type Association = gorm.Association
type Config ¶
type Config struct { Alias string `yaml:"alias" json:"alias"` Type string `yaml:"type" json:"type"` Server string `yaml:"server" json:"server"` Port int `yaml:"port" json:"port"` Database string `yaml:"database" json:"database"` User string `yaml:"user" json:"user"` Password string `yaml:"password" json:"password"` MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"` MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns"` Charset string `yaml:"charset" json:"charset"` TimeZone string `yaml:"timezone" json:"timezone"` MaxLeftTime time.Duration `yaml:"maxLeftTime" json:"maxLeftTime"` }
type DBConditions ¶
type DBConditions struct { And map[string]interface{} Or map[string]interface{} Not map[string]interface{} Limit int Offset int Order interface{} Select interface{} Group string Having interface{} NeedCount bool Count int64 Distinct interface{} // grom v1 暂不支持 }
DBConditions DB常用的查询条件封装
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) SetLogLevel ¶
func (*Engine) SetLogMode ¶
type LoggerFunc ¶
type LoggerFunc func(...interface{})
func (LoggerFunc) Print ¶
func (f LoggerFunc) Print(args ...interface{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.