3 ms·
With opaque cursors, how does a client specify "a desired amount"?
by mypalmike 4y ago
With opaque cursors, how does a client specify "a desired amount"?
- amelius 4y agoYou just say "this cursor + 5 pages", for example.
- hombre_fatal 4y agoYou send `GET /items[?cursor=<cursor>]` to my server. I respond: [ "items": [ {...}, {...}, {...}, ... ], "next_cursor": "77963b7a" ] How do you request "this cursor + 5 pages"?
- amelius 4y agoGET /items?cursor=77963b7a&add_to_cursor=5pages
- ignaciochiazzo 4y agoI strongly suggest not doing this since the application will be implementing `offset` in that scenario. This is the same as having Page-based pagination but with a cursor that acts a filter/sorting blob.