## Index

### Functions

- attribute
- attribute2

## Functions

### attribute

- attribute<T>(attributePath: keyof T): ConditionExpressionDefinitionChain
- attribute(attributePath: string): ConditionExpressionDefinitionChain

- - Defined in dynamo/expression/logical-operator/attribute.function.ts:38

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

  #### Type parameters

  - #### T

  #### Parameters

  - ##### attributePath: keyof T

  #### Returns ConditionExpressionDefinitionChain

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

  Use this method when accessing a nested attribute of a model

  #### Parameters

  - ##### attributePath: string

  #### Returns ConditionExpressionDefinitionChain

### attribute2

- attribute2<T, K>(modelConstructor: ModelConstructor<T>, attributePath: K): ConditionExpressionDefinitionChainTyped<T, K>

- - Defined in dynamo/expression/logical-operator/attribute.function.ts:30

  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
       .scan()
       .where(attribute2(Person, 'age').equals(5))
       .exec()

  When using the attribute2 we have type support for the equals (and all other condition 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 ConditionExpressionDefinitionChainTyped<T, K>

Generated using TypeDoc