Get only the first records with deno kv but reversed ordered
I'm using Deno KV to store articles.
Generating the ID for the articles:
this will order the articles in the DB chronologically in an ascendent way.
If I want to get all the articles reversed ordered I'm doing:
But I want to get only the 4 most recent articles.
How can I achieve that without waiting for the full database to load and then reverse it?
Thank you very much for your help community!
Generating the ID for the articles:
this will order the articles in the DB chronologically in an ascendent way.
If I want to get all the articles reversed ordered I'm doing:
But I want to get only the 4 most recent articles.
How can I achieve that without waiting for the full database to load and then reverse it?
Thank you very much for your help community!
