Skip to content

Commit

Permalink
format readme
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Dec 23, 2024
1 parent d19e1ad commit 2b9895a
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,20 @@ const result = await knex('persons')
```

## `pagination` object
| Key | Value |
| --- | --- |
| perPage | Items per page. |
| currentPage | Current page number. |
| from | Counting ID of the first item of the current page. |
| to | Counting ID of the last item of the current page. |

**Returned if `isLengthAware == true` or `currentPage == 1` or `isFromStart == true`:**

| Key | Value |
| --- | --- |
| total | Total items that the full query contains. |
| lastPage | Last page number. |

| Key | Value |
|-------------|----------------------------------------------------|
| perPage | Items per page. |
| currentPage | Current page number. |
| from | Counting ID of the first item of the current page. |
| to | Counting ID of the last item of the current page. |

If `isLengthAware == true` or `currentPage == 1` or `isFromStart == true` pagination object will contain `total` & `lastPage`:

| Key | Value |
|----------|-------------------------------------------|
| total | Total items that the full query contains. |
| lastPage | Last page number. |


This lib got inspiration from [`knex-paginator`](https://github.com/cannblw/knex-paginator).

0 comments on commit 2b9895a

Please sign in to comment.