granite-paginate
Version, currently 1.1.13 versions
- 1.1.1latestOct 7, 2020
- 1.1.0not indexedOct 7, 2020
- 1.0.0not indexedOct 7, 2020
github.com/Nicolab/granite-paginate
Crystal shard adding pagination support for Granite ORM.
3 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
granite-paginate:
github: Nicolab/granite-paginate
version: ~> 1.1.1Then run:
shards installshard.yml
- Crystal
0.35.1- License
- MIT
- Author
- Nicolas Talle
Dependencies
Development Dependencies
README
granite-paginate
Crystal shard adding pagination support for Granite ORM.
Installation
-
Add the dependency to your
shard.yml:dependencies: granite-paginate: github: nicolab/granite-paginate -
Run
shards install
Usage
Add (require) granite-paginate shard after Granite initialization.
# TODO: Granite initialization here...
require "granite-paginate"
posts = Post.paginate.where(published: true)
posts = Post.where(published: true).paginate
posts = Post.order(:id).paginate
posts = Post.paginate.select
# Set the offset
posts = Post.order(:id).paginate(20)
# Custom limit
posts = Post.paginate(limit: 50)
# Custom offset and limit
posts = Post.paginate(3000, 100)
Development
One line:
./scripts/develop
or splitted:
Terminal 1:
docker-compose up
Terminal 2:
# host
docker-compose exec app bash
# container
just develop
When you are done, check and clean the code:
# container
just clean
Contributing
- Fork it (https://github.com/nicolab/granite-paginate/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
LICENSE
MIT (c) 2020, Nicolas Talle.
Author
| Nicolas Talle |
![]() |
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.1.1- Tagged
- Oct 7, 2020
- Commit
29c3767df276- Crystal
0.35.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Nicolab/granite-paginate
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 3
