Documentation ¶
Index ¶
- Variables
- func Get(names ...string) *xorm.Engine
- func Insert(db *xorm.Session, beans ...interface{}) (err error)
- func InsertOne(db *xorm.Session, task interface{}) (err error)
- func NextPage(page, perPage, total int64) (int64, int64)
- func Random(db *xorm.Session, data interface{}, n int, table string) (err error)
- func Range(db *xorm.Session, data interface{}, page, perPage int, where string, ...) (_ int64, err error)
- func UpdateById(db *xorm.Session, task map[string]interface{}, names ...string) error
- func Watch(db interface{})
- type Cfg
- type JsonTime
Constants ¶
This section is empty.
Variables ¶
View Source
var Name = "db"
Functions ¶
func UpdateById ¶
Types ¶
type Cfg ¶
type Cfg struct { Driver string `json:"driver" yaml:"driver"` Source string `json:"source" yaml:"source"` MaxConnTime time.Duration `json:"max_conn_time" yaml:"max_conn_time"` MaxConnIdle int `json:"max_conn_idle" yaml:"max_conn_idle"` MaxConnOpen int `json:"max_conn_open" yaml:"max_conn_open"` Mapper names.Mapper `json:"-" yaml:"-"` }
func GetDefaultCfg ¶
func GetDefaultCfg() Cfg
Click to show internal directories.
Click to hide internal directories.