News for hackers. Stuff that matters.
Re:Building APIs: A Comparison Between Cursor and Offset Pag... by ablol on Saturday April 17, 2021 @03:16PM (#26846695)
How does keyset based pagination deal with deletes? If the cursor/current key is deleted you lose your paging state. Or am I wrong?
Re:Building APIs: A Comparison Between Cursor and Offset Pag... by inshadows on Saturday April 17, 2021 @06:35PM (#26848041)
AFAU you use keyset as upper/lower bounds in your SQL query, so deletion is not problem. Example:

Cursor ($ID:$DATE) = "123:2012-01-01"

Query: select * from tbl where id >= $ID and date >= $DATE limit 100