paramx

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	Field string `json:"field" comment:"排序字段"`
	Type  string `json:"type" comment:"排序方式(asc/desc)"`
}

type OrderList

type OrderList []*Order

排序

func (OrderList) GetOrderBySql

func (params OrderList) GetOrderBySql() (orderBy string)

计算分页数量

type Page

type Page struct {
	CurrPage int64 `json:"currPage" comment:"当前页码"`
	PageSize int64 `json:"pageSize" comment:"当前页数量"`
}

分页参数

func (*Page) GetMysqlPageSql

func (page *Page) GetMysqlPageSql() string

获取Mysql分页SQL

func (*Page) GetOffset

func (page *Page) GetOffset() int64

计算offset(pg/oracle)

func (*Page) GetPageTotal

func (page *Page) GetPageTotal(total int64) int64

计算分页数量

func (*Page) GetPgPageSql

func (page *Page) GetPgPageSql() string

获取PG分页SQL

type TimeRange

type TimeRange struct {
	StartTime string `json:"startTime" comment:"开始时间"`
	EndTime   string `json:"endTime" comment:"结束时间"`
}

type TimeRangeList

type TimeRangeList []*TimeRange

时间范围

type TimestampRange

type TimestampRange struct {
	StartTime int64 `json:"startTime" comment:"开始时间"`
	EndTime   int64 `json:"endTime" comment:"结束时间"`
}

type TimestampRangeList

type TimestampRangeList []*TimestampRange

时间戳范围

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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