vibe.d beta banner
get vibe.d
0.10.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

Jan Jurzitza

Copyright

© 2020-2022 Jan Jurzitza

License

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