MongoCollection.ensureIndex

Creates or updates an index.

Note that the overload taking an associative array of field orders will be removed. Since the order of fields matters, it is only suitable for single-field indices.

  1. void ensureIndex(const(Tuple!(string, int))[] field_orders, IndexFlags flags, Duration expire_time)
    struct MongoCollection
    @safe
    void
    ensureIndex
    (
    scope const(Tuple!(string, int))[] field_orders
    ,,
    Duration expire_time = 0.seconds
    )
  2. void ensureIndex(int[string] field_orders, IndexFlags flags, ulong expireAfterSeconds)

Meta