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

asked 9 months ago327 views
1 Answer
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
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions