Sets an attribute to the result of adding two values. Note: The reference attributes must exists for the update to succeed. Supported types: number.
A value (or reference attribute) to using in add operation.
A value (or reference attribute) to using in add operation.
Update resolver function to set a number attribute to the result of adding two values.
Adds an array of values to a set based attribute (sets are ordered). Supported types: StringSet, NumberSet or BinarySet.
Array of values to add.
Update resolver function to add an array of values to a set based attribute.
Appends items to the end of an existing list attribute. Supported types: list.
A list (or reference attribute) to append.
Update resolver function to append a list to an attribute.
A value (or reference attribute) used on the left side of the arithmetic expression.
Operation to use for expression.
A value (or reference attribute) used on the left side of the arithmetic expression.
Update resolver function to set a number attribute to the result of the arithmetic expression.
Decrements a number based attribute by a certain amount. Note: The attribute that is being decremented must exist in the table item for this update to succeed. Supported types: number.
A value (or reference attribute) to decrement the number attribute by.
Update resolver function to decrement the attribute.
Sets the default value for an attribute that does not exist in on the table item.
Default value to set if attribute value does not exist.
Update resolver function to set default value.
Delete the attribute from the table item. Setting an model property to null also deletes the attribute.
Update resolver function to delete attribute.
Deletes an array of indices from an list based attribute (the lists are 0 based). Supported types: list.
Array of indices (numbered indexes into the list) to delete from the list.
Update resolver function to delete indices in a list based attribute.
Increments a number based attribute by a certain amount. Note: The attribute that is being incremented must exist in the table item for this update to succeed. Supported types: number.
A value (or reference attribute) to increment the number attribute by.
Update resolver function to increment the attribute.
Sets an attribute to the result of joining two lists. Supported types: list.
A list (or reference attribute) to add to the start.
A list (or reference attribute) to add at the end.
Update resolver function to set an attribute to the joining of two lists.
Updates the inner attributes of a map based attribute. set is used to overwrite the entire map attribute, while map updates the attributes inside of table attribute. Example if an address attribute is set to { street: 'One Infinite Loop', city: 'Cupertino', state: 'CA, zip: '95014' } then using Update.map({street: '1 Apple Park Way'}) will result in { street: '1 Apple Park Way', city: 'Cupertino', state: 'CA, zip: '95014' }, while using Update.set({street: '1 Apple Park Way'}) will result in { street: '1 Apple Park Way' }. Supported types: map.
Map of update values and resolvers to evaluate.
Update resolver function to recursively set the inner attributes of a map based attribute.
Typed based version of Update.map.
The model or resolver to create resolver for.
Update resolver function to remove an array of values from a set based attribute.
Map that contains string keys with a Model T for each value.
Map containing the models to change for each key.
Update resolver function to remove an array of values from a set based attribute.
Used to reference other attributes for the value argument in Update.* methods.
Attribute path to resolve and get alias for.
Update function that returns the alias for the path.
Used to reference other attributes for the value argument in Update.* methods.
Attribute path to resolve and get alias for.
The default value to set if the path attribute value does not exist.
Update function that returns the alias for the path.
Prepends items to the beginning of an existing list attribute. Supported types: list.
A list (or reference attribute) to prepend.
Update resolver function to prepend a list to an attribute.
Removes an array of values from a set based attribute (sets are ordered). Supported types: StringSet, NumberSet or BinarySet.
Array of values to remove.
Update resolver function to remove an array of values from a set based attribute.
Sets the attribute to a new value. Set is the default action for model property not set to a Update.Resolver
The value (or attribute reference) to update the item attribute to, will add attribute if not present.
Update resolver function to set attribute to a value.
Sets the values of select indices for list based attribute. Supported types: list.
Update resolver function to set values for select indices in a list based attribute.
Sets an attribute to the result of subtracting two values. Note: The reference attributes must exists for the update to succeed. Supported types: number.
A value (or reference attribute) to use on the left side of a subtract operation.
A value (or reference attribute) to use on the right side of a subtract operation.
Update resolver function to set a number attribute to the result of subtracting two values.
Generated using TypeDoc
Set of helper methods used to build UpdateExpression for use in DynamoDB update method.
examples/Update.Model.ts (imports: examples/Table.ts)
Using Table (though in most cases you'll use Model):
examples/Update.Table.ts (imports: examples/Table.ts)