Documentation ¶
Index ¶
- Variables
- func AutoMigrate(lists map[string]interface{})
- func ConMysql(config Config)
- type Config
- type Orm
- func (db *Orm) Create(model interface{}) error
- func (db *Orm) Delete(model interface{}) error
- func (db *Orm) First(model interface{}, id interface{}, relationship ...string) error
- func (db *Orm) Get(model interface{}, relationship ...string)
- func (db *Orm) Limit(offset int, limit int) *Orm
- func (db *Orm) One(model interface{}, relationship ...string) error
- func (db *Orm) Or(where map[string]interface{}) *Orm
- func (db *Orm) Order(orderBy string) *Orm
- func (db *Orm) Paginate(lists *PageList, relationship ...string)
- func (db *Orm) Relationship(relationship []string) *Orm
- func (db *Orm) Save(model interface{}) error
- func (db *Orm) Where(where map[string]interface{}) *Orm
- type PageList
- type Where
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB // 定义 mysql 连接实例
Functions ¶
func AutoMigrate ¶
func AutoMigrate(lists map[string]interface{})
Types ¶
Click to show internal directories.
Click to hide internal directories.