## Index

### Functions

- update
- update2

## Functions

### update

- update<T>(attributePath: keyof T): UpdateExpressionDefinitionChain
- update(attributePath: string): UpdateExpressionDefinitionChain

- - Defined in dynamo/expression/logical-operator/update.function.ts:39

  Use this method when accessing a top level attribute of a model to have type checking for attributePath

  #### Type parameters

  - #### T

  #### Parameters

  - ##### attributePath: keyof T

  #### Returns UpdateExpressionDefinitionChain

- - Defined in dynamo/expression/logical-operator/update.function.ts:44

  Use this method when accessing a nested attribute of a model

  #### Parameters

  - ##### attributePath: string

  #### Returns UpdateExpressionDefinitionChain

### update2

- update2<T, K>(modelConstructor: ModelConstructor<T>, attributePath: K): UpdateExpressionDefinitionChainTyped<T, K>

- - Defined in dynamo/expression/logical-operator/update.function.ts:29

  Use this method when accessing a top level attribute of a model with strict typing of the value in chained function

      @Model()
      class Person{

        @PartitionKeyUUID()
        id: string
        age: number
      }

      store.update('idValue')
       .operations(update2(SimpleWithPartitionKeyModel, 'age').set(5))
       .exec()

  When using the update2 we have type support for the set (and all other update functions) value, it can only be number, because the type of age is number too, this only works when not using a custom mapper. The downside of the strict typing is the model constructor parameter which is only required for typing reasons.

  #### Type parameters

  - #### T

  - #### K: keyof T

  #### Parameters

  - ##### modelConstructor: ModelConstructor<T>

  - ##### attributePath: K

  #### Returns UpdateExpressionDefinitionChainTyped<T, K>

Generated using TypeDoc