Documentation ¶
Index ¶
- func Init(mas []config.Mysql, sls []config.Mysql)
- type Mysql
- func (m *Mysql) AddSharding(key interface{}) *Mysql
- func (m *Mysql) BatchInsert(key interface{}, batch *ds.Batch) (int64, error)
- func (m *Mysql) Begin() error
- func (m *Mysql) Commit() error
- func (m *Mysql) Delete(key interface{}, del *ds.Delete) (int64, error)
- func (m *Mysql) Exec(key interface{}, statement string) error
- func (m *Mysql) FetchAll(key interface{}, table string, where map[string]interface{}, t interface{}) ([]interface{}, error)
- func (m *Mysql) FetchAllByWhere(key interface{}, table string, where *ds.Where, t interface{}) ([]interface{}, error)
- func (m *Mysql) FetchPage(key interface{}, table string, where map[string]interface{}, t interface{}, ...) ([]interface{}, error)
- func (m *Mysql) FetchPageByWhere(key interface{}, table string, where *ds.Where, t interface{}, ...) ([]interface{}, error)
- func (m *Mysql) FetchRow(key interface{}, table string, where map[string]interface{}, t interface{}) (interface{}, error)
- func (m *Mysql) GetConnection(key int) *db.Mysql
- func (m *Mysql) GetShardingKey(key interface{}) int
- func (m *Mysql) Insert(key interface{}, insert *ds.Insert) (int64, error)
- func (m *Mysql) Query(key interface{}, query string, t interface{}, args ...interface{}) ([]interface{}, error)
- func (m *Mysql) RollBack() error
- func (m *Mysql) Update(key interface{}, update *ds.Update) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mysql ¶
type Mysql struct {
// contains filtered or unexported fields
}
func (*Mysql) AddSharding ¶
func (*Mysql) BatchInsert ¶
func (*Mysql) FetchAllByWhere ¶ added in v0.0.6
func (*Mysql) FetchPageByWhere ¶ added in v0.0.6
func (*Mysql) GetShardingKey ¶
Click to show internal directories.
Click to hide internal directories.