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

已提問 9 個月前檢視次數 353 次
1 個回答
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
專家
已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南