Get next and previous item from dynamo db based on current item

0

Hi there, I need to get next and previous item based on the current item from dynamo db.

I only have two columns in table. 1) Entity id (UUID) and 2) URL.

Is there any way so that I get next and previous value?

Or should I have to use incremental id for entity id value and based on the current id I'll just do increment and decrement for next and previous value?

Can anyone please help me?

Thanks

gefragt vor 9 Monaten353 Aufrufe
1 Antwort
0

Hi

DynamoDB is a key/value store and there is no concept of next / previous item (value). It looks like you have an HASH key that is an UUID and you need to query the table using the UUID. If you need the possibility to query next / previous item you probably need an incrementing key so you can determine the next / previous.

profile picture
EXPERTE
beantwortet vor 9 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen