A Mapper is responsible to define how a specific type is mapped to an attribute value which can be stored in dynamodb and how to parse the value from dynamodb back into the specific type

### Type parameters

- #### T

- #### R: StringAttribute | NumberAttribute | BinaryAttribute | StringSetAttribute | NumberSetAttribute | BinarySetAttribute | MapAttribute | ListAttribute | NullAttribute | BooleanAttribute

### Hierarchy

- MapperForType

### Implemented by

- BooleanMapper
- CollectionMapper
- DateMapper
- EnumMapper
- MomentMapper
- NullMapper
- NumberMapper
- ObjectMapper
- StringMapper

## Index

### Methods

- fromDb
- toDb

## Methods

### fromDb

- fromDb(attributeValue: R, propertyMetadata?: PropertyMetadata<T, R>): T

- - Defined in mapper/for-type/base.mapper.ts:36

  Maps an attribute value coming from dynamodb to an javascript type

  #### Parameters

  - ##### attributeValue: R

  - ##### Optional propertyMetadata: PropertyMetadata<T, R>

  #### Returns T

### toDb

- toDb(propertyValue: T, propertyMetadata?: PropertyMetadata<T, R>): R | null

- - Defined in mapper/for-type/base.mapper.ts:51

  Maps a js value to an attribute value so it can be stored in dynamodb, supported types are

  S(tring) N(umber) B(inary) BOOL NULL S(tring)S(et) N(umber)S(et) B(inary)S(et) L(ist)

  #### Parameters

  - ##### propertyValue: T

  - ##### Optional propertyMetadata: PropertyMetadata<T, R>

  #### Returns R | null

Generated using TypeDoc