Documentation ¶
Index ¶
- Constants
- func CommaPaginator(page int, listRow int, total int) map[string]int
- func PagenationParse(page int, limitRow int) string
- func PagenationStart(page int, limitRow int) int
- func QueryBuild(querySql string, currPage int, usePage bool) string
- func QueryTotalBuild(tableName string, otherCondi string, alias string) string
Constants ¶
View Source
const ( TOTAL_PAGE_FIELD = "total_page" PAGE_FIELD = "page" ROWS_FIELD = "rows" TOTAL_RECORD_FIELD = "total_record" )
View Source
const (
ListRow = 20
)
Variables ¶
This section is empty.
Functions ¶
func CommaPaginator ¶
*
page 当前页 listRow 每页行数 total 数据总数 分页数据填充 返回 => map[string]int ["total_page"] => 1, ["page"] => 1, ["rows"] => 20, ["total_record"] => 3, author Bill
func PagenationParse ¶
* 页面计算(用于sql解析) 比如 1 页面 20 行 => LIMIT 0,20 比如取第五页 => 80,20 @author Bill
func PagenationStart ¶
* 页面计算(开始于结束步长区间) @author Bill
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.