You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Often when doing updates, you need to prevent against upserts with something like update.onlyIfAttribute('pk').attributeExists(). It often is not really a failure when the condition fails; it just means "there was no item there to update". You then have to catch the error that DynamoDB throws and ignore the ConditionalCheckFailedException.
Describe the solution you'd like
I'd like to be able to do this:
awaitstore.update(file.pk,file.sk).updateAttribute('filename').set(newValue).onlyIfAttribute('pk').attributeExists()// but don't allow upserts.ignoreConditionalCheckFailed()// if there's no item there, that's fine.exec();
Describe alternatives you've considered
I currently have a reusable catch function that I use:
Is your feature request related to a problem? Please describe.
Often when doing updates, you need to prevent against upserts with something like
update.onlyIfAttribute('pk').attributeExists()
. It often is not really a failure when the condition fails; it just means "there was no item there to update". You then have to catch the error that DynamoDB throws and ignore the ConditionalCheckFailedException.Describe the solution you'd like
I'd like to be able to do this:
Describe alternatives you've considered
I currently have a reusable catch function that I use:
The text was updated successfully, but these errors were encountered: