vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Function MongoCollection.ensureIndex

Creates or updates an index.

void ensureIndex (
  scope const(std.typecons.Tuple!(string,int))[] field_orders,
  IndexFlags flags = cast(IndexFlags)0,
  core.time.Duration expire_time = dur(0L)
) @safe;

deprecated void ensureIndex (
  int[string] field_orders,
  IndexFlags flags = cast(IndexFlags)0,
  ulong expireAfterSeconds = 0LU
) @safe;

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.


Sönke Ludwig


© 2012-2016 RejectedSoftware e.K.


Subject to the terms of the MIT license, as written in the included LICENSE.txt file.