Interface: IndexOptions
Defined in: service-core/src/decorators/PersistenceDecorators.ts:59
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:65
Set to true to build the index in the background. (MongoDB only)
collation?
optionalcollation?:CollationOptions
Defined in: service-core/src/decorators/PersistenceDecorators.ts:69
The language-specific collation rules to apply to the index. (MongoDB only)
expireAfterSeconds?
optionalexpireAfterSeconds?:number
Defined in: service-core/src/decorators/PersistenceDecorators.ts:67
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:63
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:61
Set to true to enforce that all values of the indexed properties are unique.