ExpectedAttributeValue class
Represents a condition to be compared with an attribute value. This
condition can be used with DeleteItem
, PutItem
, or
UpdateItem
operations; if the comparison evaluates to true, the
operation succeeds; if not, the operation fails. You can use
ExpectedAttributeValue
in one of two different ways:
-
Use
AttributeValueList
to specify one or more values to compare against an attribute. UseComparisonOperator
to specify how you want to perform the comparison. If the comparison evaluates to true, then the conditional operation succeeds. -
Use
Value
to specify a value that DynamoDB will compare against an attribute. If the values match, thenExpectedAttributeValue
evaluates to true and the conditional operation succeeds. Optionally, you can also setExists
to false, indicating that you do not expect to find the attribute value in the table. In this case, the conditional operation succeeds only if the comparison evaluates to false.
Value
and Exists
are incompatible with
AttributeValueList
and ComparisonOperator
. Note
that if you use both sets of parameters at once, DynamoDB will return a
ValidationException
exception.
Constructors
-
ExpectedAttributeValue({List<
AttributeValue> ? attributeValueList, ComparisonOperator? comparisonOperator, bool? exists, AttributeValue? value})
Properties
-
attributeValueList
→ List<
AttributeValue> ? -
One or more values to evaluate against the supplied attribute. The number of
values in the list depends on the
ComparisonOperator
being used.final - comparisonOperator → ComparisonOperator?
-
A comparator for evaluating attributes in the
AttributeValueList
. For example, equals, greater than, less than, etc.final - exists → bool?
-
Causes DynamoDB to evaluate the value before attempting a conditional
operation:
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → AttributeValue?
-
Represents the data for the expected attribute.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited