CreateIndexOptions class

@param {object} options Optional settings. @param {(number|string)} options.writeConcern The write concern. @param {boolean} options.unique=false Creates an unique index. @param {boolean} options.sparse=false Creates a sparse index. @param {boolean} options.background=false Creates the index in the background, yielding whenever possible. @param {boolean} options.dropDups=false A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value @param {number} options.min For geospatial indexes set the lower bound for the co-ordinates. @param {number} options.max For geospatial indexes set the high bound for the co-ordinates. @param {number} options.v Specify the format version of the indexes. @param {number} options.expireAfterSeconds Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher) @param {string} options.name Override the autogenerated index name (useful if the resulting name is larger than 128 bytes) @param {object} options.partialFilterExpression Creates a partial index based on the given filter object (MongoDB 3.2 or higher) @param {object} options.collation Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields). @param {ClientSession} options.session optional session to use for this operation

Constructors

CreateIndexOptions(DbCollection collection, {WriteConcern? writeConcern, bool uniqueIndex = false, bool sparseIndex = false, bool background = false, bool dropDuplicatedEntries = false, double? geoLowerBound, double? geoHighBound, String? indexName, Map? partialFilterExpression, Map? collation})

Properties

background bool
getter/setter pair
collation Map?
getter/setter pair
collection DbCollection
getter/setter pair
dropDuplicatedEntries bool
getter/setter pair
expireAfterSeconds int?
getter/setter pair
formatVersion double?
getter/setter pair
geoHighBound double?
getter/setter pair
geoLowerBound double?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
indexName String?
getter/setter pair
options Map<String, Object>
no setter
partialFilterExpression Map?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sparseIndex bool
getter/setter pair
uniqueIndex bool
getter/setter pair
writeConcern WriteConcern?
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited