3 ms·
When you use a cursor, the user has to pass a cursor back to the application to see the next page. So on the first page load, the server will send the records
by aarondf 5y ago
When you use a cursor, the user has to pass a cursor back to the application to see the next page.
So on the first page load, the server will send the records and a cursor that contains the info {'lastId': 32} and when the user requests page two, they'll have to send the cursor {'lastId': 32} so the server knows where to start.
In practice, the cursors are usually encoded and appended to the URLs.
You can never calculate what page 2 should be, you have to know what the last item on page 1 was, because that dictates where to start on page 2.