Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderBy ¶
type OrderBy []OrderByPair
OrderBy ORDER BY信息
func OneOrderBy ¶
func OneOrderBy(name string, direction OrderByDirection) OrderBy
OneOrderBy 构建仅包含一对的orderBy
func TwoOrderBy ¶
func TwoOrderBy(name0 string, direction0 OrderByDirection, name1 string, direction1 OrderByDirection) OrderBy
TwoOrderBy 构建包含两对的orderBy
type OrderByDirection ¶
type OrderByDirection string
OrderByDirection SQL(ORDER BY)排序方向
var ( // ASC 升序 ASC OrderByDirection = "ASC" // DESC 降序 DESC OrderByDirection = "DESC" )
type OrderByPair ¶
type OrderByPair struct {
Name string
Direction OrderByDirection
}
OrderByPair ORDER BY对
func (OrderByPair) String ¶
func (pair OrderByPair) String() string
type Page ¶
type Page[INT constraints.Integer] struct { // contains filtered or unexported fields }
Page 分页
func NewPage ¶
func NewPage[INT constraints.Integer](pageNo, pageSize INT) (pg *Page[INT])
NewPage 返回分页实例
func (*Page[INT]) TotalPages ¶
func (pg *Page[INT]) TotalPages(totalRecords INT) (totalPages INT)
TotalPages 返回总记录数对应的总分页数
Click to show internal directories.
Click to hide internal directories.