biezhi / Gorm Paginator
Licence: mit
gorm pagination extension
Stars: ✭ 136
Programming Languages
go
31211 projects - #10 most used programming language
Labels
Projects that are alternatives of or similar to Gorm Paginator
gorm-cursor-paginator
A paginator doing cursor-based pagination based on GORM
Stars: ✭ 92 (-32.35%)
Mutual labels: pagination, gorm
Ugin
UGin is an API boilerplate written in Go (Golang) with Gin Framework.
Stars: ✭ 110 (-19.12%)
Mutual labels: gorm
Phalgo
phalgo 已经更换为 https://github.com/sunmi-OS/gocore phalgo不在维护
Stars: ✭ 110 (-19.12%)
Mutual labels: gorm
Zendea
A free, open-source, self-hosted forum software written in Go 官方QQ群:656868
Stars: ✭ 116 (-14.71%)
Mutual labels: gorm
List.js
The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.
Stars: ✭ 10,650 (+7730.88%)
Mutual labels: pagination
Infinite scroll pagination
Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.
Stars: ✭ 102 (-25%)
Mutual labels: pagination
Ember Impagination
An Ember Addon that puts the fun back in asynchronous, paginated datasets
Stars: ✭ 123 (-9.56%)
Mutual labels: pagination
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+1208.82%)
Mutual labels: gorm
Jsonapi.rb
Lightweight, simple and maintained JSON:API support for your next Ruby HTTP API.
Stars: ✭ 116 (-14.71%)
Mutual labels: pagination
Apiproject
[https://www.sofineday.com], golang项目开发脚手架,集成最佳实践(gin+gorm+go-redis+mongo+cors+jwt+json日志库zap(支持日志收集到kafka或mongo)+消息队列kafka+微信支付宝支付gopay+api加密+api反向代理+go modules依赖管理+headless爬虫chromedp+makefile+二进制压缩+livereload热加载)
Stars: ✭ 124 (-8.82%)
Mutual labels: gorm
Vue Table Dynamic
🎉 A dynamic table with sorting, filtering, editing, pagination, multiple select, etc.
Stars: ✭ 106 (-22.06%)
Mutual labels: pagination
Blazorcrud
Demo application built with the Blazor client-side hosting model (WebAssembly) and .NET Core REST APIs secured by a JWT service.
Stars: ✭ 121 (-11.03%)
Mutual labels: pagination
Seven
Eleventy template using Bootstrap, Sass, Webpack, Vue.js powered search, includes lots of other features
Stars: ✭ 114 (-16.18%)
Mutual labels: pagination
Reactables
GigaTables is a ReactJS plug-in to help web-developers process table-data in applications and CMS, CRM, ERP or similar systems.
Stars: ✭ 112 (-17.65%)
Mutual labels: pagination
gorm-paginator
Usage
go get github.com/biezhi/gorm-paginator/pagination
type User struct {
ID int
UserName string `gorm:"not null;size:100;unique"`
}
var users []User
db = db.Where("id > ?", 0)
pagination.Pagging(&pagination.Param{
DB: db,
Page: 1,
Limit: 3,
OrderBy: []string{"id desc"},
}, &users)
With Gin
r := gin.Default()
r.GET("/", func(c *gin.Context) {
page, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
limit, _ := strconv.Atoi(c.DefaultQuery("limit", "3"))
var users []User
paginator := pagination.Pagging(&pagination.Param{
DB: db,
Page: page,
Limit: limit,
OrderBy: []string{"id desc"},
ShowSQL: true,
}, &users)
c.JSON(200, paginator)
})
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].