Versions in this module Expand all Collapse all v1 v1.0.0 Aug 10, 2021 Changes in this version + const DriverMysql + const FTimeDate + const FTimeDateTime + const FTimeTime + const OPDelete + const OPInsert + const OPSelect + const OPUpdate + const TagAutoPK + const TagDate + const TagDateTime + const TagPK + const TagTime + func AddConfig(connectName string, config *Config) bool + func Boot(connectName string) + type Builder struct + func NewBuilder() *Builder + func (b *Builder) OrderBy(field string) + func (b *Builder) OrderByDesc(field string) + func (b *Builder) Select(fields []string) error + func (b *Builder) Update(updateFields []string) + func (b *Builder) WhereCondition(field string, condition string, value interface{}) error + type Collect struct + func (c *Collect) Err() error + func (c *Collect) Item() interface{} + func (c *Collect) Next() bool + func (c *Collect) Total() int64 + type Config struct + Charset string + Collation string + Database string + Driver string + Host string + Password string + Port string + Username string + func (c *Config) DNS() string + type Field struct + type Manager struct + func (m *Manager) Exec(query string, bindings ...interface{}) (sql.Result, error) + func (m *Manager) Query(query string, bindings ...interface{}) (*sql.Rows, error) + func (m *Manager) QueryCollect(query string, bindings ...interface{}) (*Collect, error) + type Model struct + func New(entity interface{}) (m *Model, err error) + func (m *Model) Delete() (rowAffected int64, err error) + func (m *Model) Eq(field string, value interface{}) *Model + func (m *Model) Exec(query string, args ...interface{}) (sql.Result, error) + func (m *Model) First() (interface{}, error) + func (m *Model) Get() (collect *Collect, err error) + func (m *Model) Gt(field string, value interface{}) *Model + func (m *Model) Gte(field string, value interface{}) *Model + func (m *Model) Insert() (id int64, err error) + func (m *Model) Like(field string, value interface{}) *Model + func (m *Model) Lt(field string, value interface{}) *Model + func (m *Model) Lte(field string, value interface{}) *Model + func (m *Model) Neq(field string, value interface{}) *Model + func (m *Model) OrderBy(field string) *Model + func (m *Model) OrderByDesc(field string) *Model + func (m *Model) Paginate(page int64, pageSize int64) (collect *Collect, err error) + func (m *Model) Query(query string, args ...interface{}) (*sql.Rows, error) + func (m *Model) QueryCollect(query string, args ...interface{}) (collect *Collect, err error) + func (m *Model) Select(s []string) *Model + func (m *Model) Update(updateFields []string) (rowAffected int64, err error) + type Query interface + Delete func() (rowAffected int64, err error) + Eq func(field string, value interface{}) *Model + Exec func(string, ...interface{}) (sql.Result, error) + First func() (interface{}, error) + Get func() (*Collect, error) + Gt func(field string, value interface{}) *Model + Gte func(field string, value interface{}) *Model + Insert func() (id int64, err error) + Like func(field string, value interface{}) *Model + Lt func(field string, value interface{}) *Model + Lte func(field string, value interface{}) *Model + Neq func(field string, value interface{}) *Model + OrderBy func(string) *Model + OrderByDesc func(string) *Model + Paginate func(page int64, pageSize int64) (*Collect, error) + Query func(string, ...interface{}) (*sql.Rows, error) + Select func([]string) *Model + Update func([]string) (rowAffected int64, err error) + type Stmt interface + Bindings func() []interface{} + Build func() error + PrepareSQL func() string + SetBuilder func(*Builder) + SetOp func(operateType) + type StmtMysql struct + func (sm *StmtMysql) Bindings() []interface{} + func (sm *StmtMysql) Build() error + func (sm *StmtMysql) PrepareSQL() string + func (sm *StmtMysql) SetBuilder(b *Builder) + func (sm *StmtMysql) SetOp(op operateType) + type SupportTypes map[string]bool