Documentation ¶
Index ¶
- Variables
- func AssemberInsertOrUpdateSQL(part1Sql string, part2Sql string, part3Sql string, fieldSql string, ...) error
- func AssembleInRangeSQL(part1Sql string, part2Sql string, part1Args *[]interface{}, listArgs *[]uint64, ...)
- func AssembleInRangeSQLTemplate(part1Sql string, part2Sql string, part1Args *[]interface{}, ...)
- func ConnectToDefaultMySQL()
- func DefaultMySQL() *sqlx.DB
- func InitMySQLClient(sqlConf *extconfig.MySQLAddress, setting string, targetDB **sqlx.DB)
- func ReadDBByPage(queryFn QueryFn, readFn ReadRowFn) error
- func ReadDBByPageWithLimit(queryFn QueryFn, readFn ReadRowFn, totalCountLimit int) error
- func Setup()
- func Teardown()
- type QueryFn
- type ReadRowFn
Constants ¶
This section is empty.
Variables ¶
View Source
var DBMock sqlmock.Sqlmock
Functions ¶
func AssemberInsertOrUpdateSQL ¶
func AssemberInsertOrUpdateSQL( part1Sql string, part2Sql string, part3Sql string, fieldSql string, elemCount uint32, sqlRet *string, ) error
组装 insert ... update 语句
func AssembleInRangeSQL ¶
func AssembleInRangeSQL( part1Sql string, part2Sql string, part1Args *[]interface{}, listArgs *[]uint64, part2Args *[]interface{}, sqlRet *string, fieldArgs *[]interface{}, )
组装 in () 类型的SQL语句及参数
func AssembleInRangeSQLTemplate ¶
func AssembleInRangeSQLTemplate( part1Sql string, part2Sql string, part1Args *[]interface{}, listArgs *[]interface{}, part2Args *[]interface{}, sqlRet *string, fieldArgs *[]interface{}, )
组装 in () 类型的SQL语句及参数
func InitMySQLClient ¶
func InitMySQLClient(sqlConf *extconfig.MySQLAddress, setting string, targetDB **sqlx.DB)
初始化MySQL连接
func ReadDBByPageWithLimit ¶
分页读取MySQL表,可设置记录数上限
Types ¶
Click to show internal directories.
Click to hide internal directories.