How to do a paginated query in Cloud Datastore


I'm working on an integration of retool with Cloud Datastore and I would like to know how to do a paginated query, there is something like offset or cursor?


Welcome to the community!

Sorry @ScottR , but I don't get how I can use the datastore client inside retool?

Btw I'm using a Cloud Storage type resource in my query.



Sorry about that...
You can Limit the query according to the GUI but the pagination might have to be done on the front end using a table component....

Hey @Paulo_Medeiros you can definitely do this in SQL mode.

  1. Enable server side pagination on the table with Total row count set to a second query that determines the total number of records that will be retrieved.
    Screenshot 2023-11-07 at 7.44.34 AM

  1. Use the table's pagination property to set limit and offset in the sql query

Setting the query to run when inputs are changed will rerun the query when the table's pagination arrows are clicked. Let me know if you have any issues with this!