News for hackers. Stuff that matters.
Re:Paginating Requests in APIs (2020) by qsort on Saturday May 28, 2022 @01:02PM (#31541904)
No need for anything special, you would just query with something like "SELECT whatever FROM Table WHERE cursor>value ORDER BY cursor LIMIT n". Obviously there needs to be an index over the columns of the cursor, but any reasonable engine should allow you to add that effortlessly.
Re:Paginating Requests in APIs (2020) by mbStavola on Saturday May 28, 2022 @01:06PM (#31541927)
The complication comes from having a cursor over results that are sorted on multiple columns. It's not incredibly difficult to implement, but it can certainly be annoying to do, especially if you want to support before+after cursor as well.