Currently used page[number]/page[size] pagination strategy is less flexible than offset/limit strategy. Getting page by number and size is easy and efficient with offset/limit, but getting data given offset and limit can be quite inefficient if we can only set page.
For example, the worst case. We want to get x rows with offset x - 1. We need to get 2x - 1 rows and cut requited locally. If we were using offset/limit pagination strategy we would have downloaded almost twice less data from our server.
It would be better if flask-rest-jsonapi supported both strategies.
Currently used
page[number]
/page[size]
pagination strategy is less flexible thanoffset
/limit
strategy. Getting page bynumber
andsize
is easy and efficient withoffset
/limit
, but getting data given offset and limit can be quite inefficient if we can only set page.For example, the worst case. We want to get
x
rows with offsetx - 1
. We need to get2x - 1
rows and cut requited locally. If we were usingoffset
/limit
pagination strategy we would have downloaded almost twice less data from our server.It would be better if
flask-rest-jsonapi
supported both strategies.