Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamoDB. Additional On Update behavior for particular attribute. #2902

Open
1 task done
uraniumdawn opened this issue Dec 8, 2021 · 2 comments
Open
1 task done
Labels
dynamodb-enhanced feature-request A feature should be added or improved. p3 This is a minor priority issue

Comments

@uraniumdawn
Copy link

uraniumdawn commented Dec 8, 2021

Describe the feature

Current SDK v2 has UpdateBehavior enum. It contains only WRITE_ALWAYS and WRITE_IF_NOT_EXISTS. It would be great to have additional enum to define the updated policy for elements in the collection attribute's type as like Set/List. Something like list_appent() in update expression but for DynamoDbBean

Is your Feature Request related to a problem?

No.

Proposed Solution

Additional enum APPEND_ON_COLLECTION inside of UpadteBehavior annotation applied only for Set/List attribute.
On UpdateItem action all elements of the collection's attribute should add to the existing ones. In the List case elements can contain duplicates and don't contain in the Set case.

Describe alternatives you've considered

No response

Acknowledge

  • I may be able to implement this feature request

AWS Java SDK version used

2.17.97

JDK version used

openjdk 11.0.13 2021-10-19 OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8) OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)

Operating System and version

MacOS 12.0.1

@uraniumdawn uraniumdawn added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 8, 2021
@debora-ito debora-ito added dynamodb-enhanced and removed needs-triage This issue or PR still needs to be triaged. labels Jan 21, 2022
@debora-ito
Copy link
Member

Hi @uraniumdawn thank you for reaching out.

You mean like this list_append function for update expression, correct? -
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.SET.UpdatingListElements

@uraniumdawn
Copy link
Author

@debora-ito Exactly.

@yasminetalby yasminetalby added the p3 This is a minor priority issue label Nov 28, 2022
aws-sdk-java-automation added a commit that referenced this issue Feb 16, 2024
…2fe77bdd8

Pull request: release <- staging/61e57920-0118-4452-ac16-b3c2fe77bdd8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamodb-enhanced feature-request A feature should be added or improved. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

3 participants