-
Notifications
You must be signed in to change notification settings - Fork 863
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
UpdateExpression API #2900
UpdateExpression API #2900
Conversation
...odb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateAction.java
Outdated
Show resolved
Hide resolved
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Outdated
Show resolved
Hide resolved
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Outdated
Show resolved
Hide resolved
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Outdated
Show resolved
Hide resolved
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Outdated
Show resolved
Hide resolved
...-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/AddUpdateAction.java
Outdated
Show resolved
Hide resolved
...-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/AddUpdateAction.java
Outdated
Show resolved
Hide resolved
...-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/AddUpdateAction.java
Show resolved
Hide resolved
...-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/AddUpdateAction.java
Outdated
Show resolved
Hide resolved
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Outdated
Show resolved
Hide resolved
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Show resolved
Hide resolved
...-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/AddUpdateAction.java
Show resolved
Hide resolved
private AddUpdateAction(Builder builder) { | ||
this.path = Validate.paramNotNull(builder.path, "path"); | ||
this.value = Validate.paramNotNull(builder.value, "value"); | ||
this.expressionValues = unmodifiableMap(Validate.paramNotNull(builder.expressionValues, "expressionValues")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it true that this must always be non-null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK; not sure if you're just referring to expressionValues or all of them. For expressionValues I believe so, but we should test this premise before release. I figured it's better to be restrictive at first.
this.path = Validate.paramNotNull(builder.path, "path"); | ||
this.value = Validate.paramNotNull(builder.value, "value"); | ||
this.expressionValues = unmodifiableMap(Validate.paramNotNull(builder.expressionValues, "expressionValues")); | ||
this.expressionNames = unmodifiableMap(builder.expressionNames != null ? builder.expressionNames : new HashMap<>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to wrap it with a new HashMap?
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
public List<RemoveUpdateAction> removeActions() { | ||
return Collections.unmodifiableList(removeActions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should create a new List and wrap it with unmodifiableList in the ctor. Can we do a find and replace to fix all occurrences of list and map?
...enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/update/UpdateExpression.java
Show resolved
Hide resolved
SonarCloud Quality Gate failed. |
…22e43c3d4 Pull request: release <- staging/82f02350-8349-48bb-a3e4-b3f22e43c3d4
Motivation and Context
In order to support DynamoDB UpdateExpressions we need a representation of these concepts in the public API.
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html
Description
Adding a set of classes to represent UpdateExpression actions, and an UpdateExpression class to contain them. See separate design document for motivation and architecture.
Testing
Unit tested.