Class UpdateExpression


  • public final class UpdateExpression
    extends Object
    Contains sets of UpdateAction that represent the four DynamoDB update actions: SET, ADD, REMOVE and DELETE.

    Use this class to build an immutable UpdateExpression with one or more UpdateAction. An UpdateExpression may be merged with another. When two UpdateExpression are merged, the actions of each group of UpdateAction, should they exist, are combined; all SET actions from each expression are concatenated, all REMOVE actions etc.

    DynamoDb Enhanced will convert the UpdateExpression to a format readable by DynamoDb,

    Example:-

     
     RemoveUpdateAction removeAction = ...
     SetUpdateAction setAction = ...
     UpdateExpression.builder()
                     .addAction(removeAction)
                     .addAction(setAction)
                     .build();
     
     
    See respective subtype of UpdateAction, for example SetAction, for details on creating that action.