Jason Lee 0e78f83efb Add paginate methods for query.
API same as [Kaminari](https://github.com/kaminari/kaminari)

before:

```go
page, _ := strconv.Atoi(ctx.Query("page"))
if page <= 0 {
        page = 1
}
perPage, _ := strconv.Atoi(ctx.Query("size"))
if perPage <= 0 {
        perPage = 20
}
offset := (page - 1) * perPage
scope := DB.Where("name = ?", "jinzhu").Offset(offset).Limit(perPage)
```

after:

```go
scope := DB.Where("name = ?", "jinzhu").MaxPerPage(50).
        Page(ctx.Query("page")).Per(ctx.Query("size"))
```
2020-01-28 10:18:45 +08:00
2018-02-10 13:55:11 +08:00
2019-05-02 22:49:30 +08:00
2018-11-03 21:55:52 +08:00
2019-12-05 23:13:54 +08:00
2019-11-27 11:21:05 +09:00
2018-02-10 11:07:07 +08:00
2020-01-26 23:28:32 +08:00
2020-01-26 23:28:32 +08:00
2015-01-05 08:59:18 +08:00
2019-12-06 09:16:51 +08:00
2016-03-08 22:00:15 +08:00
2016-01-15 21:16:48 +08:00
2019-04-14 12:30:11 +04:00
2019-11-27 11:21:05 +09:00
2019-05-05 16:23:52 +08:00
2017-03-22 23:50:42 +08:00
2020-01-28 10:18:45 +08:00
2020-01-28 10:18:45 +08:00

GORM

The fantastic ORM library for Golang, aims to be developer friendly.

go report card wercker status codecov Join the chat at https://gitter.im/jinzhu/gorm Open Collective Backer Open Collective Sponsor MIT license GoDoc

Overview

  • Full-Featured ORM (almost)
  • Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism)
  • Hooks (Before/After Create/Save/Update/Delete/Find)
  • Preloading (eager loading)
  • Transactions
  • Composite Primary Key
  • SQL Builder
  • Auto Migrations
  • Logger
  • Extendable, write Plugins based on GORM callbacks
  • Every feature comes with tests
  • Developer Friendly

Getting Started

Contributing

You can help to deliver a better GORM, check out things you can do

License

© Jinzhu, 2013~time.Now

Released under the MIT License

Description
The fantastic ORM library for Golang, aims to be developer friendly
Readme
Languages
Go 99.9%
Shell 0.1%