vibe.d beta banner
get vibe.d
0.9.0

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

IndexModel.add - multiple declarations

Function IndexModel.add

Adds a single field or multikey index with a direction.

ref IndexModel add (
  string field,
  int direction
) return @safe;

Call this method multiple times with different fields to create a compound index.

Parameters

NameDescription
field the name of the field to index
direction 1 for ascending or -1 for descending

Returns

this IndexModel instance (caller)

Function IndexModel.add

Adds an index with a given index type. Use IndexType for a type-safe setting of the string.

ref IndexModel add (
  string field,
  string type
) return @safe;

Parameters

NameDescription
field the name of the field to index
type the index type to use

Returns

this IndexModel instance (caller)

Authors
Copyright
License