Documentation
¶
Index ¶
- Variables
- func GetCallback(name string, cb func(*xorm.Engine))
- func GetOne(db *xorm.Session, task interface{})
- 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{}, query interface{}, ...) error
- type Cfg
- type Client
- type JsonTime
Constants ¶
This section is empty.
Variables ¶
View Source
var Name = "db"
Functions ¶
func GetCallback ¶
Types ¶
type Cfg ¶
type Cfg struct {
Debug bool `json:"debug" yaml:"debug"`
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 DefaultCfg ¶
func DefaultCfg() *Cfg
type Client ¶
func (*Client) UpdateResObj ¶
func (c *Client) UpdateResObj(val interface{})
Click to show internal directories.
Click to hide internal directories.