Documentation ¶
Index ¶
- func InitXormEngine(url string, maxOpenConns int, maxIdleConns int, prefix string) (engine *xorm.Engine, err error)
- type MySQL
- func (mysql *MySQL) Close() error
- func (mysql *MySQL) Count(countsql string, args ...interface{}) int
- func (mysql *MySQL) Delete(deletesql string, args ...interface{}) error
- func (mysql *MySQL) Insert(insertsql string, args ...interface{}) error
- func (mysql *MySQL) Query(querysql string, args ...interface{}) ([]map[string]interface{}, error)
- func (mysql *MySQL) Query2Json(querysql string, args ...interface{}) (jsonstr string, err error)
- func (mysql *MySQL) State()
- func (mysql *MySQL) TransBegin() (*sql.Tx, error)
- func (mysql *MySQL) TransCommit(tx *sql.Tx) error
- func (mysql *MySQL) TransRollback(tx *sql.Tx) error
- func (mysql *MySQL) Update(updatesql string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL 操作封装
func (*MySQL) Query2Json ¶
Query2Json 直接把查询结果转为json
func (*MySQL) TransRollback ¶
TransRollback 提交事务
Click to show internal directories.
Click to hide internal directories.