Hello all! I'm leading about Serverless SST framew...
# help
Hello all! I'm leading about Serverless SST framework using this guide. I learned how to develop an API that selects all the items of a table or the items filtered by key. I was wondering how to write an API to select a list of items from a table using pagination. For example: 'SELECT FIRST 10 SKIP 10 * FROM TableA'. Is it possible? How can this be made? Thanks.
I don’t think it is directly relevant to SST. It is about DynamoDB
You can take a look at the aws sdk documentation here if you are using Node
For pagination, take a look at
And for skipping
Pagination works differently in DynamoDb, which means you won't be able to offer page offsets (e.g. page 3 of N) when paginating. This is due to how pagination is implemented in DynamoDb. DDB returns a maximum of 1MB of data per operation before paginating your results. The number of items in your results can vary depending on your item size. As a result, you'll need to rethink your pagination style in your client to accommodate.
Thank you for the answers!