Documentation ¶
Index ¶
- type ArgsGetAll
- type ArgsGetListPrev
- type ArgsGetListSimple
- type ArgsGetListSimpleConditionID
- type Quick
- func (c *Quick) DeleteCacheByID(id int64)
- func (c *Quick) DeleteCachePrefix()
- func (c *Quick) GetAnalysis() *QuickAnalysis
- func (c *Quick) GetCacheInfoByID(id int64, data any) (err error)
- func (c *Quick) GetCacheListByID(id int64, data any) (err error)
- func (c *Quick) GetCacheMarkByInfoID(id int64) string
- func (c *Quick) GetCacheMarkByListID(id int64) string
- func (c *Quick) GetClient() *CoreSQL2.Client
- func (c *Quick) GetDelete() *QuickDelete
- func (c *Quick) GetInfo() *QuickInfo
- func (c *Quick) GetInsert() *QuickInsert
- func (c *Quick) GetList() *QuickList
- func (c *Quick) GetUpdate() *QuickUpdate
- func (c *Quick) Init(tableName string, structData any) (err error)
- func (c *Quick) SetCacheInfoByID(id int64, data any)
- func (c *Quick) SetCacheListByID(id int64, data any)
- type QuickAnalysis
- type QuickDelete
- type QuickInfo
- func (c *QuickInfo) CheckInfoByFields(fields map[string]any, haveDelete bool) (b bool, err error)
- func (c *QuickInfo) CheckInfoByFieldsAndTime(fields map[string]any, haveDelete bool, timeField string, ...) (b bool, err error)
- func (c *QuickInfo) GetInfoByField(fieldName string, fieldVal any, haveDelete bool, result any) (err error)
- func (c *QuickInfo) GetInfoByFields(fields map[string]any, haveDelete bool, result any) (err error)
- func (c *QuickInfo) GetInfoByID(id int64, result any) (err error)
- type QuickInsert
- type QuickList
- func (c *QuickList) GetAll(args *ArgsGetAll, result any) (dataCount int64, err error)
- func (c *QuickList) GetDistinctList(fieldName string) (result pq.StringArray, err error)
- func (c *QuickList) GetListDo(ctx *CoreSQL2.ClientListCtx, result any) (dataCount int64, err error)
- func (c *QuickList) GetListPrev(args *ArgsGetListPrev) (ctx *CoreSQL2.ClientListCtx)
- func (c *QuickList) GetListSimple(args *ArgsGetListSimple, result any) (dataCount int64, err error)
- type QuickUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgsGetAll ¶ added in v5.2.31
type ArgsGetAll struct { //检索字段 // 仅支持field_list:"true"的字段 ConditionFields []ArgsGetListSimpleConditionID //是否删除 IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"` }
type ArgsGetListPrev ¶
type ArgsGetListPrev struct { //分页 Pages CoreSQL2.ArgsPages `json:"pages"` //是否删除 IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetListPrev 获取高级列表参数
type ArgsGetListSimple ¶
type ArgsGetListSimple struct { //分页 Pages CoreSQL2.ArgsPages `json:"pages"` //检索字段 // 仅支持field_list:"true"的字段 ConditionFields []ArgsGetListSimpleConditionID //是否删除 IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetListSimple 获取简单列表参数
type Quick ¶
type Quick struct {
// contains filtered or unexported fields
}
Quick 快速组装模块 * 1. 支持快速对定义好的结构体,自动生成通用方法 2. 方法包括:查看列表、查看详情、创建、更新、删除
func (*Quick) DeleteCachePrefix ¶ added in v5.3.1
func (c *Quick) DeleteCachePrefix()
DeleteCachePrefix 删除缓冲
func (*Quick) GetAnalysis ¶ added in v5.3.1
func (c *Quick) GetAnalysis() *QuickAnalysis
GetAnalysis 获取analysis
func (*Quick) GetCacheInfoByID ¶
GetCacheInfoByID 获取缓冲Info数据
func (*Quick) GetCacheListByID ¶
GetCacheListByID 获取缓冲List数据
func (*Quick) GetCacheMarkByInfoID ¶
GetCacheMarkByInfoID 获取Info缓冲标识码
func (*Quick) GetCacheMarkByListID ¶
GetCacheMarkByListID 获取List缓冲标识码
func (*Quick) SetCacheInfoByID ¶
SetCacheInfoByID 设置Info缓冲
func (*Quick) SetCacheListByID ¶
SetCacheListByID 设置List缓冲
type QuickAnalysis ¶ added in v5.3.1
type QuickAnalysis struct {
// contains filtered or unexported fields
}
QuickAnalysis 获取统计
func (*QuickAnalysis) GetCountByField ¶ added in v5.3.1
func (c *QuickAnalysis) GetCountByField(field string, val any) (count int64)
GetCountByField 获取指定条件的数据量
type QuickDelete ¶
type QuickDelete struct {
// contains filtered or unexported fields
}
QuickDelete 删除信息
func (*QuickDelete) DeleteByField ¶ added in v5.2.31
func (c *QuickDelete) DeleteByField(fieldName string, val any) (err error)
DeleteByField 根据字段删除
func (*QuickDelete) DeleteByFieldReal ¶ added in v5.3.1
func (c *QuickDelete) DeleteByFieldReal(fieldName string, val any) (err error)
DeleteByFieldReal 根据字段删除 真实删除无视软删除
func (*QuickDelete) DeleteByID ¶
func (c *QuickDelete) DeleteByID(id int64) (err error)
DeleteByID 根据ID删除
type QuickInfo ¶
type QuickInfo struct {
// contains filtered or unexported fields
}
QuickInfo 获取信息
func (*QuickInfo) CheckInfoByFields ¶ added in v5.2.33
CheckInfoByFields 检查多条件是否存在数据
func (*QuickInfo) CheckInfoByFieldsAndTime ¶ added in v5.2.34
func (c *QuickInfo) CheckInfoByFieldsAndTime(fields map[string]any, haveDelete bool, timeField string, timeMin, timeMax time.Time) (b bool, err error)
CheckInfoByFieldsAndTime 检查多条件是否存在数据,且判断时间是否在有效期内
func (*QuickInfo) GetInfoByField ¶ added in v5.2.31
func (c *QuickInfo) GetInfoByField(fieldName string, fieldVal any, haveDelete bool, result any) (err error)
GetInfoByField 通过指定字段获取信息(必须是唯一的字段) 注意,当字段存在软删除时,请务必启用haveDelete,否则将出现异常
func (*QuickInfo) GetInfoByFields ¶ added in v5.2.33
GetInfoByFields 多个条件获取数据
type QuickInsert ¶
type QuickInsert struct {
// contains filtered or unexported fields
}
QuickInsert 插入模块
type QuickList ¶
type QuickList struct {
// contains filtered or unexported fields
}
QuickList 获取列表
func (*QuickList) GetAll ¶ added in v5.2.31
func (c *QuickList) GetAll(args *ArgsGetAll, result any) (dataCount int64, err error)
GetAll 获取所有数据 注意筛选条件会判断是否为空,<0的数值不会被筛选
func (*QuickList) GetDistinctList ¶ added in v5.3.0
func (c *QuickList) GetDistinctList(fieldName string) (result pq.StringArray, err error)
GetDistinctList 获取指定字段的所有差异值清单
func (*QuickList) GetListPrev ¶
func (c *QuickList) GetListPrev(args *ArgsGetListPrev) (ctx *CoreSQL2.ClientListCtx)
GetListPrev 获取高级列表
func (*QuickList) GetListSimple ¶
func (c *QuickList) GetListSimple(args *ArgsGetListSimple, result any) (dataCount int64, err error)
GetListSimple 获取简单列表 注意筛选条件会判断是否为空,<0的数值不会被筛选
type QuickUpdate ¶
type QuickUpdate struct {
// contains filtered or unexported fields
}
QuickUpdate 更新模块
func (*QuickUpdate) UpdateByID ¶
func (c *QuickUpdate) UpdateByID(args any) (err error)
UpdateByID 根据ID更新数据