### Type parameters

- #### T

### Hierarchy

- Metadata

## Index

### Constructors

- constructor

### Properties

- modelOptions

### Methods

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

## Constructors

### constructor

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

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

  #### Parameters

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

  #### Returns Metadata

## Properties

### modelOptions

modelOptions: ModelMetadata<T>

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

## Methods

### forProperty

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

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

  #### Parameters

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

  #### Returns PropertyMetadata<T> | undefined

### getIndex

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

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

  #### 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:96

  #### 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:40

  #### 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:50
  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:74
  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

Generated using TypeDoc