Skip to content

Commit

Permalink
adding coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelarte committed Nov 10, 2024
1 parent fc808b2 commit 5085e16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### TODO

- Add code coverage badge
- Test if it's possible page in the 'model'
- Check for fmt
- Add more examples

### Added

- Added pagorminator plugin for gorm
- Added examples
- Added examples
- Added badges
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ Gorm plugin to add pagination to your select queries
```go
var products []*Products
// give me the first 10 products
db.Scopes(pagorminator.WithPagination(pagorminator.PageRequestOf(0, 10))).Find(&products)
pageRequest := pagorminator.PageRequestOf(0, 10)
db.Scopes(pagorminator.WithPagination(&pageRequest)).Find(&products)
```

The plugin will populate the page request variable will the `total amounts` and `total pages` fields.

## 🎓 Examples

- [Simple](./examples/simple/main.go)
Expand Down

0 comments on commit 5085e16

Please sign in to comment.