Versions in this module Expand all Collapse all v1 v1.0.0 Dec 27, 2016 Changes in this version + type Config map[string]Connect + type Connect struct + Driver string + Host string + Name string + Password string + Port int + User string + func (p *Connect) SqlString() string + func (p *Connect) String() string + type DbDriverMysql struct + func Singleton(connect *Connect) (*DbDriverMysql, error) + func (p *DbDriverMysql) Exec(sql string, args ...interface{}) (affectCount int64, lastInsertId int64, err error) + func (p *DbDriverMysql) Query(sql string, args ...interface{}) (data []map[string]interface{}, err error) + type Model struct + func (p *Model) Connect(connectName string) *Model + func (p *Model) ConnectAdd(connectName string, connect Connect) *Model + func (p *Model) Count() (count int64, err error) + func (p *Model) Delete() (count int64, err error) + func (p *Model) ExecSql(sql string, args ...interface{}) (affectCount int64, lastInsertId int64, err error) + func (p *Model) Field(fields ...string) *Model + func (p *Model) First() (has bool, err error) + func (p *Model) Get() (has bool, err error) + func (p *Model) GetAutoSetField(method string) (needSet map[string]interface{}, err error) + func (p *Model) Insert() (err error) + func (p *Model) InsertMap(maps map[string]interface{}) (pk int64, err error) + func (p *Model) Limit(skip int, len int) *Model + func (p *Model) Model(m interface{}) *Model + func (p *Model) OrderBy(field string, desc bool) *Model + func (p *Model) Page(page int, pageSize int) (pageData Page, has bool, err error) + func (p *Model) PageWithOutTotal(page int, pageSize int) (pageData Page, has bool, err error) + func (p *Model) QuerySql(sql string, args ...interface{}) (has bool, data []map[string]interface{}, err error) + func (p *Model) QueryToMap() (has bool, data []map[string]interface{}, err error) + func (p *Model) Reset() *Model + func (p *Model) Sqls() []string + func (p *Model) Table(table string) *Model + func (p *Model) Update() (count int64, err error) + func (p *Model) UpdateMap(mapper map[string]interface{}) (count int64, err error) + func (p *Model) Where(condition string, values ...interface{}) *Model + func (p *Model) WhereIn(field string, params ...interface{}) *Model + type Orm struct + func New(config Config) *Orm + func (p *Orm) ExecSql(sql string, args ...interface{}) (affectCount int64, lastInsertId int64, err error) + func (p *Orm) Model(mo interface{}) *Model + func (p *Orm) QuerySql(sql string, args ...interface{}) (has bool, data []map[string]interface{}, err error) + func (p *Orm) Table(table string) *Model + type Page struct + Page int + PageSize int + PageTotal int + Total int64 Incompatible versions in this module v2.0.0+incompatible Jul 31, 2017