As the title suggests, I am looking for a way to perform keyset pagination like in PostgreSQL. However, I believe that the uid
is an arbitrary number and is non-deterministic of order. Then, I found this discussion which builds upon using the lt
function to verify what comes before said node. However, this skips certain datasets with exactly the same values as the paginated field, so I thought of a solution by using:
asc: not(uid($uid)) and ge(field, value)
or
desc: not(uid($uid)) and le(field, value)
Is this a good way for doing pagination? Are there supposed risks or downsides to using this “hack”? Or are there other ways of pagination with ordering? Thanks in advance!