add pagination method, add tests, update api docs, bump version, add release info
This commit is contained in:
@ -416,6 +416,27 @@ Actual call delegated to QuerySet.
|
||||
|
||||
`(QuerysetProxy)`: QuerysetProxy
|
||||
|
||||
<a name="relations.querysetproxy.QuerysetProxy.paginate"></a>
|
||||
#### paginate
|
||||
|
||||
```python
|
||||
| paginate(page: int, page_size: int = 20) -> "QuerysetProxy"
|
||||
```
|
||||
|
||||
You can paginate the result which is a combination of offset and limit clauses.
|
||||
Limit is set to page size and offset is set to (page-1) * page_size.
|
||||
|
||||
Actual call delegated to QuerySet.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `page_size (int)`: numbers of items per page
|
||||
- `page (int)`: page number
|
||||
|
||||
**Returns**:
|
||||
|
||||
`(QuerySet)`: QuerySet
|
||||
|
||||
<a name="relations.querysetproxy.QuerysetProxy.limit"></a>
|
||||
#### limit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user