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