vibe.d beta banner
get vibe.d
0.7.30

Function 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.

Prototypes

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

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

Sönke Ludwig

Copyright

© 2012-2016 RejectedSoftware e.K.

License

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