Reputation: 1120
Is the following operation implementable in DynamoDB:
On providing the key,
status
as "active".additional_info
starts_with "xyz"
additional_info
additional_info
Basically, an update where we override value of status
regardless of additional_info
. And optionally unset additional_info
as an attribute if a condition is satisfied?
Upvotes: 1
Views: 227
Reputation: 7122
It cannot be done in one call. It also can't be done in a single transaction wrapping the two calls into one, because a transaction can't repeatedly reference the same item.
If you can just make two calls, that's the way to go. If you need it to be somewhat transactional, you'll need to control things in your app. The details depend on your requirements.
Upvotes: 1