Documentation ¶
Index ¶
- Constants
- type DBMysql
- func (d *DBMysql) BeginTrans() (IDBMysql, error)
- func (d *DBMysql) CommitTrans() error
- func (d *DBMysql) DB() *sql.DB
- func (d *DBMysql) ExecuteCreate(tableName string, fields map[string]interface{}) (int64, error)
- func (d *DBMysql) ExecuteQuery(tableName string, fields map[string]interface{}, whereArr []string, ...) (bool, error)
- func (d *DBMysql) ExecuteSearch(tableName string, fields []string, whereArr []string, whereArgs []interface{}, ...) (int64, int64, error)
- func (d *DBMysql) ExecuteUpdate(tableName string, fields map[string]interface{}, whereArr []string, ...) (int64, error)
- func (d *DBMysql) RollbackTrans() error
- func (d *DBMysql) TX() *sql.Tx
- type IDBMysql
- type SearchRowsHandler
Constants ¶
View Source
const MaxConcatLen = "18446744073709551615"
View Source
const MaxIdleConns = 80
View Source
const MaxIdleTime = 30 * time.Minute
View Source
const MaxLifeTime = 30 * time.Minute
View Source
const MaxOpenConns = 256
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBMysql ¶
func (*DBMysql) BeginTrans ¶
func (*DBMysql) CommitTrans ¶
func (*DBMysql) ExecuteCreate ¶
func (*DBMysql) ExecuteQuery ¶
func (*DBMysql) ExecuteSearch ¶
func (*DBMysql) ExecuteUpdate ¶
func (*DBMysql) RollbackTrans ¶
type IDBMysql ¶
type IDBMysql interface { DB() *sql.DB TX() *sql.Tx ExecuteSearch(tableName string, fields []string, whereArr []string, whereArgs []interface{}, orderBy []string, pageNum, pageSize int64, rowsHandler SearchRowsHandler) (int64, int64, error) ExecuteQuery(tableName string, fields map[string]interface{}, whereArr []string, whereArgs []interface{}, orderBy []string) (bool, error) ExecuteCreate(tableName string, fields map[string]interface{}) (int64, error) ExecuteUpdate(tableName string, fields map[string]interface{}, whereArr []string, whereArgs []interface{}) (int64, error) BeginTrans() (IDBMysql, error) CommitTrans() error RollbackTrans() error }
type SearchRowsHandler ¶ added in v1.1.23
Click to show internal directories.
Click to hide internal directories.