How to use postgres cursors with supabase

My app is using a Postgresql database to store comments (in a comments table) and I was wondering how I would implement a feature where I could load more comments when a button is clicked.
I was reading up on cursors in postgres and it seems that's what I'm looking for but I can't think of a way to keep track of the cursor in the app's code(javascript), how exactly would I implement such a feature?Hey, I was wondering how I would implement a feature where I could load more comments when a button is clicked.

I don't want to have to use select queries with limit and offset because that wouldn't be ideal for long lists of comments
image.png
Was this page helpful?