cactoos-jdbc icon indicating copy to clipboard operation
cactoos-jdbc copied to clipboard

Keyset pagination supprot

Open l3r8yJ opened this issue 8 months ago • 3 comments

it would be nice to have keyset pagination here

l3r8yJ avatar Nov 24 '23 08:11 l3r8yJ

Hi @l3r8yJ!

If I undestood correctly, KeySet pagination applies when we have a sequenced column, like numbered id, right? The problem is I don't know it. In my examples (the phonebook) the id is a UUID and this don't apply keyset pagination, right? So, what do you recommend in this case?

fabriciofx avatar Nov 24 '23 11:11 fabriciofx

@fabriciofx I'll send a pr later with the implementation. I've implemented this a few times in my work, maybe you'll like it

we don't need to know which field the customer will use for the order (there is also a time-based UUID, for that matter), we can create just a generic solution. Very often records in tables have columns like createdAt, updatedAt, etc.

l3r8yJ avatar Nov 24 '23 11:11 l3r8yJ

@l3r8yJ A PR will be welcome! Thanks!

fabriciofx avatar Nov 24 '23 12:11 fabriciofx