Documentation ¶
Index ¶
- func CheckTimeHaveData(d time.Time) bool
- func CheckTimeThanNow(d time.Time) bool
- func CreateMore(db *sqlx.DB, query string, args []interface{}) (err error)
- func CreateOne(db *sqlx.DB, query string, args interface{}) (result sql.Result, err error)
- func CreateOneAndData(db *sqlx.DB, tableName string, query string, args interface{}, ...) (err error)
- func CreateOneAndID(db *sqlx.DB, query string, args interface{}) (lastID int64, err error)
- func DeleteAll(db *sqlx.DB, tableName string, where string, args interface{}) (result sql.Result, err error)
- func DeleteAllSoft(db *sqlx.DB, tableName string, where string, value interface{}) (result sql.Result, err error)
- func DeleteOne(db *sqlx.DB, tableName string, fieldName string, value interface{}) (result sql.Result, err error)
- func DeleteOneSoft(db *sqlx.DB, tableName string, fieldName string, value interface{}) (result sql.Result, err error)
- func GetAllAvg(db *sqlx.DB, tableName string, fieldsName string, where string, ...) (count float64, err error)
- func GetAllAvgMap(db *sqlx.DB, tableName string, fieldsName string, where string, ...) (count float64, err error)
- func GetAllAvgMapTables(db *sqlx.DB, fieldsName string, query string, whereArgs interface{}) (count float64, err error)
- func GetAllCount(db *sqlx.DB, tableName string, fieldsName string, where string, ...) (count int64, err error)
- func GetAllCountMap(db *sqlx.DB, tableName string, fieldsName string, where string, ...) (count int64, err error)
- func GetAllCountMapTables(db *sqlx.DB, fieldsName string, query string, whereArgs interface{}) (count int64, err error)
- func GetAllSumMap(db *sqlx.DB, tableName string, fieldsName string, where string, ...) (count int64, err error)
- func GetDeleteSQL(isRemove bool, where string) string
- func GetDeleteSQLField(isRemove bool, where string, field string) string
- func GetList(db *sqlx.DB, data interface{}, query string, maps map[string]interface{}) (err error)
- func GetListAndCount(db *sqlx.DB, data interface{}, tableName string, fieldName string, ...) (count int64, err error)
- func GetListPageAndCount(db *sqlx.DB, data interface{}, tableName string, fieldName string, ...) (count int64, err error)
- func GetListPageAndCountArgs(db *sqlx.DB, data interface{}, tableName string, fieldName string, ...) (count int64, err error)
- func GetNeedChange(where string, fieldName string, need bool, open bool) string
- func GetNeedChangeNow(where string, fieldName string, need bool, open bool) string
- func GetOne(db *sqlx.DB, data interface{}, query string, maps map[string]interface{}) (err error)
- func GetWhereInt64(where string, maps map[string]interface{}, fieldName string, param int64) (string, map[string]interface{})
- func LastRows(tx *sqlx.Tx, err error) error
- func LastRowsAffected(tx *sqlx.Tx, result sql.Result, err error) error
- func LastRowsAffectedCreate(tx *sqlx.Tx, stmt *sqlx.NamedStmt, args interface{}, err error) (int64, error)
- func UpdateOne(db *sqlx.DB, query string, args interface{}) (result sql.Result, err error)
- func UpdateOneSoft(db *sqlx.DB, query string, args interface{}) (result sql.Result, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTimeHaveData ¶
CheckTimeHaveData 检查sql语句的delete类型时间是否存在数据
func CheckTimeThanNow ¶
CheckTimeThanNow 检查特定时间是否存在或是否满足当前时间?
func CreateMore ¶
CreateMore 快速创建多条
func CreateOneAndData ¶
func CreateOneAndData(db *sqlx.DB, tableName string, query string, args interface{}, data interface{}) (err error)
CreateOneAndData 获取并反射数据集
func CreateOneAndID ¶
CreateOneAndID 带有反馈id的创建 本方法将在query尾巴位置插入获取ID的方法,所以请确保尾部语法封闭
func DeleteAll ¶
func DeleteAll(db *sqlx.DB, tableName string, where string, args interface{}) (result sql.Result, err error)
DeleteAll 清理所有符合条件的
func DeleteAllSoft ¶
func DeleteAllSoft(db *sqlx.DB, tableName string, where string, value interface{}) (result sql.Result, err error)
DeleteAllSoft 通用软删除
func DeleteOne ¶
func DeleteOne(db *sqlx.DB, tableName string, fieldName string, value interface{}) (result sql.Result, err error)
DeleteOne 通用删除处理
func DeleteOneSoft ¶
func DeleteOneSoft(db *sqlx.DB, tableName string, fieldName string, value interface{}) (result sql.Result, err error)
DeleteOneSoft 通用软删除
func GetAllAvg ¶
func GetAllAvg(db *sqlx.DB, tableName string, fieldsName string, where string, whereArgs ...interface{}) (count float64, err error)
GetAllAvg 获取平均行数
func GetAllAvgMap ¶
func GetAllAvgMap(db *sqlx.DB, tableName string, fieldsName string, where string, whereArgs interface{}) (count float64, err error)
GetAllAvgMap 获取平均行数,map方式
func GetAllAvgMapTables ¶
func GetAllAvgMapTables(db *sqlx.DB, fieldsName string, query string, whereArgs interface{}) (count float64, err error)
GetAllAvgMapTables 混合多表查询方法集合
func GetAllCount ¶
func GetAllCount(db *sqlx.DB, tableName string, fieldsName string, where string, whereArgs ...interface{}) (count int64, err error)
GetAllCount 获取总行数
func GetAllCountMap ¶
func GetAllCountMap(db *sqlx.DB, tableName string, fieldsName string, where string, whereArgs interface{}) (count int64, err error)
GetAllCountMap 获取总行数,map方式
func GetAllCountMapTables ¶
func GetAllCountMapTables(db *sqlx.DB, fieldsName string, query string, whereArgs interface{}) (count int64, err error)
GetAllCountMapTables 混合多表查询方法集合
func GetAllSumMap ¶
func GetAllSumMap(db *sqlx.DB, tableName string, fieldsName string, where string, whereArgs interface{}) (count int64, err error)
GetAllSumMap 获取合计数,map方式
func GetDeleteSQL ¶
GetDeleteSQL 获取删除或尚未删除的sql语句部分
func GetListAndCount ¶
func GetListAndCount(db *sqlx.DB, data interface{}, tableName string, fieldName string, query string, where string, maps map[string]interface{}) (count int64, err error)
GetListAndCount 带count的处理机制
func GetListPageAndCount ¶
func GetListPageAndCount(db *sqlx.DB, data interface{}, tableName string, fieldName string, query string, where string, maps map[string]interface{}, pages *CoreSQLPages.ArgsDataList, filterSort []string) (count int64, err error)
GetListPageAndCount 带有分页方法的设计GetListPageAndCount
func GetListPageAndCountArgs ¶
func GetNeedChange ¶
GetNeedChange 组合某个开关类选项
func GetNeedChangeNow ¶
func GetWhereInt64 ¶
func GetWhereInt64(where string, maps map[string]interface{}, fieldName string, param int64) (string, map[string]interface{})
GetWhereInt64 检查某个数字参数
func LastRowsAffected ¶
LastRowsAffected 事务关系尾封装,带影响行判断
func LastRowsAffectedCreate ¶
func LastRowsAffectedCreate(tx *sqlx.Tx, stmt *sqlx.NamedStmt, args interface{}, err error) (int64, error)
LastRowsAffectedCreate 带有ID的创建尾部
Types ¶
This section is empty.