### Type parameters

- #### T

### Hierarchy

- Metadata

## Index

### Constructors

- constructor

### Properties

- modelOptions

### Methods

- forProperty
- getIndex
- getIndexes
- getKeysWithUUID
- getPartitionKey
- getSortKey
- findMetaDataForProperty

## Constructors

### constructor

- new Metadata(modelConstructor: ModelConstructor<T>): Metadata

- - Defined in decorator/metadata/metadata.ts:28

  #### Parameters

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

  #### Returns Metadata

## Properties

### modelOptions

modelOptions: ModelMetadata<T>

- Defined in decorator/metadata/metadata.ts:22

## Methods

### forProperty

- forProperty(propertyKey: keyof T | string): PropertyMetadata<T> | undefined

- - Defined in decorator/metadata/metadata.ts:34

  #### Parameters

  - ##### propertyKey: keyof T | string

  #### Returns PropertyMetadata<T> | undefined

### getIndex

- getIndex(indexName: string): SecondaryIndex<T> | null

- - Defined in decorator/metadata/metadata.ts:133

  #### Parameters

  - ##### indexName: string

  #### Returns SecondaryIndex<T> | null

  Returns the index if one with given name exists, null otherwise

### getIndexes

- getIndexes(): Array<SecondaryIndex<T>>

- - Defined in decorator/metadata/metadata.ts:121

  #### Returns Array<SecondaryIndex<T>>

  Returns all the secondary indexes if exists or an empty array if none is defined

### getKeysWithUUID

- getKeysWithUUID(): Array<PropertyMetadata<any>>

- - Defined in decorator/metadata/metadata.ts:65

  #### Returns Array<PropertyMetadata<any>>

  Returns all the properties property the @PartitionKeyUUID decorator is present, returns an empty array by default

### getPartitionKey

- getPartitionKey(indexName?: undefined | string): keyof T

- - Defined in decorator/metadata/metadata.ts:75
  throws

    Throws an error if no partition key was defined for the current model

  throws

    Throws an error if an indexName was delivered but no index was found for given name

  #### Parameters

  - ##### Optional indexName: undefined | string

  #### Returns keyof T

  Returns the name of partition key (not the db name if it differs from property name)

### getSortKey

- getSortKey(indexName?: undefined | string): keyof T | null

- - Defined in decorator/metadata/metadata.ts:99
  throws

    Throws an error if an indexName was delivered but no index was found for given name or the found index has no sort key defined

  #### Parameters

  - ##### Optional indexName: undefined | string

  #### Returns keyof T | null

  Returns the name of sort key (not the db name if it differs from property name) or null if none was defined

### Static Private findMetaDataForProperty

- findMetaDataForProperty<M>(modelOpts: ModelMetadata<M>, propertyName: keyof M): PropertyMetadata<M> | undefined

- - Defined in decorator/metadata/metadata.ts:24

  #### Type parameters

  - #### M

  #### Parameters

  - ##### modelOpts: ModelMetadata<M>

  - ##### propertyName: keyof M

  #### Returns PropertyMetadata<M> | undefined

Generated using TypeDoc