After quite a bit of trial and error, I have managed to get cursor-based pagination working with my retool table connected to my postgresql resource.
This has led to some new problems:
-
How do I set-up sorting with server-side cursor pagination, given that cursor pagination requires sorting by id? I can see the sortArray property provides the means to do it, but given that I want users to be able to sort by any column, it seems a compound sort would get far too complicated (and slow, for sorting all the unindexed combinations of multiple columns). Is there another way? (I'm somewhat new to SQL)
-
Why does cursor pagination not list the total number of pages/results? Offset pagination requests a total row count field; so why not with cursor pagination as well? Currently it just shows pageSize (e.g. 'Showing 100 results')