Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelarte authored Feb 22, 2025
1 parent da77740 commit 2b515c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ DB.Clauses(pageRequest).First(&products)

The pagination struct contains the following data:

+ `page`: page number, e.g. 0
+ `size`: page size, e.g. 10
+ `sort`: to apply sorting, e.g. id,asc
+ `page`: page number, e.g. `0`
+ `size`: page size, e.g. `10`
+ `sort`: to apply sorting, e.g. `id,asc`

**The plugin will calculate the total amount of elements**, and then the pagination instance provides a `GetTotalElements()` and `GetTotalPages()` methods to be used.
The pagination starts at index 0. So if the total pages is 6, then the pagination index goes from 0 to 5.
Expand Down

0 comments on commit 2b515c9

Please sign in to comment.