DBIndex constructor
DBIndex({})
Creates a new database index configuration.
Parameters:
key- Single field to index (cannot be used withkeys)keys- Compound index field specification (cannot be used withkey)unique- Enforce uniqueness constraintsparse- Create sparse indexbackground- Build index in backgrounddropDups- Drop duplicate documents (deprecated)partialFilterExpression- Filter for partial indexname- Custom index namemodernReply- Use modern reply formatcollation- Collation specification
Implementation
DBIndex({
this.key,
this.keys,
this.unique,
this.sparse,
this.background,
this.dropDups,
this.partialFilterExpression,
this.name,
this.modernReply,
this.collation,
});