pagination

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataGrid

func DataGrid(ctx echo.Context, ls interface{}, searchField string, args ...string) (map[string]interface{}, error)

DataGrid 分页信息

func DataTable

func DataTable(ctx echo.Context, ls interface{}, args ...string) (map[string]interface{}, error)

DataTable 分页信息

func Sorts

func Sorts(ctx echo.Context, table string, defaultSorts ...string) []interface{}

Sorts 获取数据查询时的排序方式

Types

type ListParameter

type ListParameter interface {
	AddMiddleware(mw ...func(db.Result) db.Result)
	Middleware() func(db.Result) db.Result
	AddCond(args ...interface{})
	SetConds(args []interface{})
	Conds() []interface{}
	Model() interface{}
}

type Lister

type Lister interface {
	ListParameter

	List(recv interface{}, mw func(db.Result) db.Result, page, size int, args ...interface{}) (func() int64, error)
}

type OffsetLister

type OffsetLister interface {
	ListParameter

	ListByOffset(recv interface{}, mw func(db.Result) db.Result, offset, size int, args ...interface{}) (func() int64, error)
}

Jump to

Keyboard shortcuts

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