public final class UpdateExpressionConverter extends Object
Modifier and Type | Method and Description |
---|---|
static List<String> |
findAttributeNames(UpdateExpression updateExpression)
Attempts to find the list of attribute names that will be updated for the supplied
UpdateExpression by looking at
the combined collection of paths and ExpressionName values. |
static Expression |
toExpression(UpdateExpression expression)
Returns an
Expression where all update actions in the UpdateExpression have been concatenated according
to the rules of DDB Update Expressions, and all expression names and values have been combined into single maps,
respectively. |
public static Expression toExpression(UpdateExpression expression)
Expression
where all update actions in the UpdateExpression have been concatenated according
to the rules of DDB Update Expressions, and all expression names and values have been combined into single maps,
respectively.
Observe that the resulting expression string should never be joined with another expression string, independently
of whether it represents an update expression, conditional expression or another type of expression, since once
the string is generated that update expression is the final format accepted by DDB.public static List<String> findAttributeNames(UpdateExpression updateExpression)
UpdateExpression
by looking at
the combined collection of paths and ExpressionName values. Because attribute names can be composed from nested
attribute references and list references, the leftmost part will be returned if composition is detected.
Examples: The expression contains a DeleteAction
with a path value of 'MyAttribute[1]'; the list returned
will have 'MyAttribute' as an element.}
Copyright © 2022. All rights reserved.