Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IndexMetadata

Index metadata contains all information about table's index.

Hierarchy

  • IndexMetadata

Index

Constructors

constructor

Properties

columnNamesWithOrderingMap

columnNamesWithOrderingMap: object

Map of column names with order set. Used only by MongoDB driver.

Type declaration

  • [key: string]: number

columns

columns: ColumnMetadata[] = []

Indexed columns.

Optional embeddedMetadata

embeddedMetadata: EmbeddedMetadata

Embedded metadata if this index was applied on embedded.

entityMetadata

entityMetadata: EntityMetadata

Entity metadata of the class to which this index is applied.

Optional expireAfterSeconds

expireAfterSeconds: number

Specifies a time to live, in seconds. This option is only supported for mongodb database.

Optional givenColumnNames

givenColumnNames: function | string[]

User specified column names.

Optional givenName

givenName: string

User specified index name.

Optional isBackground

isBackground: boolean

Builds the index in the background so that building an index an does not block other database activities. This option is only supported for mongodb database.

isFulltext

isFulltext: boolean = false

The FULLTEXT modifier indexes the entire column and does not allow prefixing. Works only in MySQL.

Optional isSparse

isSparse: boolean

If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). This option is only supported for mongodb database.

isSpatial

isSpatial: boolean = false

The SPATIAL modifier indexes the entire column and does not allow indexed columns to contain NULL values. Works only in MySQL.

isUnique

isUnique: boolean = false

Indicates if this index must be unique.

name

name: string

Final index name. If index name was given by a user then it stores normalized (by naming strategy) givenName. If index name was not given then its generated.

synchronize

synchronize: boolean = true

Indicates if this index must synchronize with database index.

Optional target

target: Function | string

Target class to which metadata is applied.

Optional where

where: string

Index filter condition.

Methods

build

Generated using TypeDoc