Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we use DynamoDB Mapper for atomic counters(Java)?

I was looking at DynamoDB documentation and googling, but I could not find any implementation of atomic counters using DynamoDB mapper.

Is this possible? Or only the low level API can be used for this?

like image 360
Bulbasaur Avatar asked Aug 01 '14 09:08

Bulbasaur


1 Answers

With the Java API you should look at UpdateItemRequest with AttributeAction.ADD

The lower level api can also be used

Edit after comment..

I am not aware of that option. Perhaps you should edit your question and add the code you wished was available.

If you want a @DynamoDBAutoIncrementAttribute for an integer - there isn't one.

like image 70
Chen Harel Avatar answered Oct 02 '22 22:10

Chen Harel