Documentation
¶
Index ¶
- type DB
- func (d *DB) Count(tanleName string, cond string) (int64, error)
- func (d *DB) Delete(tanleName string, cond string) error
- func (d *DB) GetDb() (*gorose.Connection, error)
- func (d *DB) Insert(tanleName string, data interface{}) error
- func (d *DB) SelectAll(tanleName string, fields []string, cond string, order string, ...) ([]map[string]interface{}, error)
- func (d *DB) SelectRow(tanleName string, fields []string, cond, order string) (map[string]interface{}, error)
- func (d *DB) SelectRows(tanleName string, fields []string, cond string, order string) ([]map[string]interface{}, error)
- func (d *DB) Update(tanleName string, set map[string]interface{}, cond string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) GetDb ¶
func (d *DB) GetDb() (*gorose.Connection, error)
数据库 dsn "账号:密码@tcp(IP:端口)/数据库?charset=utf8" prefix 前缀
func (*DB) SelectAll ¶
func (d *DB) SelectAll(tanleName string, fields []string, cond string, order string, limit, offset int) ([]map[string]interface{}, error)
分页查询数据
func (*DB) SelectRow ¶
func (d *DB) SelectRow(tanleName string, fields []string, cond, order string) (map[string]interface{}, error)
查询一条数据
Click to show internal directories.
Click to hide internal directories.