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

demandé il y a 9 mois355 vues
1 réponse
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
EXPERT
répondu il y a 9 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions