Interface: IndexOptions
Defined in: service-core/src/decorators/PersistenceDecorators.ts:102
The set of options available when declaring a database index via the @Index decorator.
Properties
background?
optionalbackground?:boolean
Defined in: service-core/src/decorators/PersistenceDecorators.ts:108
Set to true to build the index in the background. (MongoDB only)
collation?
optionalcollation?:CollationOptions
Defined in: service-core/src/decorators/PersistenceDecorators.ts:112
The language-specific collation rules to apply to the index. (MongoDB only)
expireAfterSeconds?
optionalexpireAfterSeconds?:number
Defined in: service-core/src/decorators/PersistenceDecorators.ts:110
The time, in seconds, after which indexed documents will be automatically deleted. (MongoDB only)
sparse?
optionalsparse?:boolean
Defined in: service-core/src/decorators/PersistenceDecorators.ts:106
Set to true to only index documents in which the indexed properties exist. (MongoDB only)
unique?
optionalunique?:boolean
Defined in: service-core/src/decorators/PersistenceDecorators.ts:104
Set to true to enforce that all values of the indexed properties are unique.