CoreSQLPages

package
v5.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterSQLSort

func FilterSQLSort(sortName string, filters []string) (query string)

func GetMaps

func GetMaps(args *ArgsDataList, maps map[string]interface{}) (query string, newMaps map[string]interface{})

GetMaps 获取maps层级的分页设计 注意部分mark不能继续使用,会发生冲突:page_sort / page_limit / page_offset

func GetMapsAnd

func GetMapsAnd(args *ArgsDataList, query string, maps map[string]interface{}) (newQuery string, newMaps map[string]interface{})

func GetMapsAndArgs

func GetMapsAndArgs(args *ArgsDataList, query string) (newQuery string)

func GetMapsAndFilter

func GetMapsAndFilter(args *ArgsDataList, query string, maps map[string]interface{}, filterSort []string) (newQuery string, newMaps map[string]interface{}, err error)

GetMapsAndFilter 带有约束的排序

func GetMapsAndFilterArgs

func GetMapsAndFilterArgs(args *ArgsDataList, query string, filterSort []string) (newQuery string, err error)

func GetMapsArgs

func GetMapsArgs(args *ArgsDataList, pageLimit int, offset int) (query string)

func GetSQL

func GetSQL(args *ArgsDataList) (query string)

GetSQL 处理分页 page > 0才会处理分页,否则只有排序

func GetSQLDesc

func GetSQLDesc(desc bool) (query string)

Types

type ArgsDataList

type ArgsDataList struct {
	Page int64  `json:"page" check:"page"`
	Max  int64  `json:"max" check:"max"`
	Sort string `json:"sort" check:"sort"`
	Desc bool   `json:"desc" check:"desc"`
}

ArgsDataList 列表数据结构

func GetArgsDataList

func GetArgsDataList() ArgsDataList

GetArgsDataList 列表快速生成默认参数

func (*ArgsDataList) GetCacheMark

func (t *ArgsDataList) GetCacheMark() string

GetCacheMark 获取缓冲名称

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL