Documentation ¶
Index ¶
- type HoTimeDB
- func (that *HoTimeDB) Action(action func(db HoTimeDB) bool) bool
- func (that *HoTimeDB) Count(table string, qu ...interface{}) int
- func (that *HoTimeDB) Delete(table string, data map[string]interface{}) int64
- func (that *HoTimeDB) Exec(query string, args ...interface{}) (sql.Result, *Error)
- func (that *HoTimeDB) Get(table string, qu ...interface{}) Map
- func (that *HoTimeDB) GetPrefix() string
- func (that *HoTimeDB) GetType() string
- func (that *HoTimeDB) InitDb(err ...*Error) *Error
- func (that *HoTimeDB) Insert(table string, data map[string]interface{}) int64
- func (that *HoTimeDB) Page(page, pageRow int) *HoTimeDB
- func (that *HoTimeDB) PageSelect(table string, qu ...interface{}) []Map
- func (that *HoTimeDB) Query(query string, args ...interface{}) []Map
- func (that *HoTimeDB) Row(resl *sql.Rows) []Map
- func (that *HoTimeDB) Select(table string, qu ...interface{}) []Map
- func (that *HoTimeDB) SetConnect(connect func(err ...*Error) (master, slave *sql.DB), err ...*Error)
- func (that *HoTimeDB) Update(table string, data Map, where Map) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HoTimeDB ¶
type HoTimeDB struct { *sql.DB ContextBase DBName string *cache.HoTimeCache Type string Prefix string LastQuery string LastData []interface{} ConnectFunc func(err ...*Error) (*sql.DB, *sql.DB) LastErr *Error *sql.Tx //事务对象 SlaveDB *sql.DB // contains filtered or unexported fields }
func (*HoTimeDB) PageSelect ¶
func (*HoTimeDB) SetConnect ¶
func (that *HoTimeDB) SetConnect(connect func(err ...*Error) (master, slave *sql.DB), err ...*Error)
SetConnect 设置数据库配置连接
Click to show internal directories.
Click to hide internal directories.