|
|
|
|
|
by simonw
1398 days ago
|
|
My implementation of cursors works by encoding the primary ID of the last row on the page, along with additional information corresponding to the sort order if that's needed. That way it doesn't matter if the record is deleted - I can still return the next page by showing records that come after that provided cursor value. There's an example on this page: https://latest.datasette.io/fixtures/sortable?_sort=sortable Since the table is sorted by the "sortable" column, the next page link includes this: ?_next=15%2Cg%2Cz
15 is the last value for "sortable" on the page, then g,z are the compound primary key for that last row. |
|
Also what if there are more than $page_size records with that 15 value?