see http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html for full documentation

### Type parameters

- #### T

- #### R

### Hierarchy

- UpdateFunctions

## Index

### Properties

- add
- appendToList
- decrementBy
- incrementBy
- remove
- removeFromListAt
- removeFromSet
- set

## Properties

### add

add: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:59

adds or manipulates a value to an attribute of type N(umber) or S(et), manipulation behaviour differs based on attribute type for numbers AWS generally recommends to use SET rather than ADD. See incrementBy and decrementBy.

param

  --update-expression "ADD QuantityOnHand :q" \ --expression-attribute-values '{":q": {"N": "5"}}' \

  --update-expression "ADD Color :c" \ --expression-attribute-values '{":c": {"SS":["Orange", "Purple"]}}' \

#### Type declaration

- - (values: T | Array<ExtractListType<T>> | Set<ExtractListType<T>>): R

  - #### Parameters

    - ##### values: T | Array<ExtractListType<T>> | Set<ExtractListType<T>>

    #### Returns R

### appendToList

appendToList: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:35

appends one or more values to the start or end of a list, value must map to ListAttribute

#### Type declaration

- - (value: T | Array<ExtractListType<T>> | Set<ExtractListType<T>>, position?: "START" | "END"): R

  - #### Parameters

    - ##### value: T | Array<ExtractListType<T>> | Set<ExtractListType<T>>

    - ##### Optional position: "START" | "END"

    #### Returns R

### decrementBy

decrementBy: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:20

only works for numbers. So it either is a number or maps to a NumberAttribute (with custom mapper)

param

  which maps to NumberAttribute

#### Type declaration

- - (value: T): R

  - #### Parameters

    - ##### value: T

    #### Returns R

### incrementBy

incrementBy: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:14

only works for numbers. So it either is a number or maps to a NumberAttribute (with custom mapper)

param

  which maps to NumberAttribute

#### Type declaration

- - (value: T): R

  - #### Parameters

    - ##### value: T

    #### Returns R

### remove

remove: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:40

removes the attribute from an item

#### Type declaration

- - (): R

  - #### Returns R

### removeFromListAt

removeFromListAt: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:45

removes item(s) at the given position(s), the remaining elements are shifted

#### Type declaration

- - (...positions: number[]): R

  - #### Parameters

    - ##### Rest ...positions: number[]

    #### Returns R

### removeFromSet

removeFromSet: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:69

delete items from sets

param
returns

  --update-expression "DELETE Color :p" \ --expression-attribute-values '{":p": {"SS": ["Yellow", "Purple"]}}'

#### Type declaration

- - (values: T | Array<ExtractListType<T>> | Set<ExtractListType<T>>): R

  - #### Parameters

    - ##### values: T | Array<ExtractListType<T>> | Set<ExtractListType<T>>

    #### Returns R

### set

set: function

- Defined in dynamo/expression/type/update-expression-definition-chain.ts:30

will update the item at the path, path can be a top level attribute or a nested attribute. samples:

- persons.age
- places[0].address.street

specify ifNotExists to only execute if the property does not exist

#### Type declaration

- - (value: T, ifNotExists?: undefined | false | true): R

  - #### Parameters

    - ##### value: T

    - ##### Optional ifNotExists: undefined | false | true

    #### Returns R

Generated using TypeDoc