From 5085e16a2e2ef82272f868065fdf2412527414a5 Mon Sep 17 00:00:00 2001 From: Manuel Doncel Martos Date: Sun, 10 Nov 2024 10:54:25 +0100 Subject: [PATCH] adding coverage badge --- CHANGELOG.md | 5 +++-- README.md | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6151294..9be6d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 \ No newline at end of file +- Added examples +- Added badges \ No newline at end of file diff --git a/README.md b/README.md index 900a568..da93321 100644 --- a/README.md +++ b/README.md @@ -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)