vibe.d beta banner
get vibe.d
0.9.0

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

Function MongoCollection.listIndexes

Returns an array that holds a list of documents that identify and describe the existing indexes on the collection.

MongoCursor!R listIndexes(R)() @safe;

Example

import vibe.db.mongo.mongo;

void test()
{
	auto coll = connectMongoDB("127.0.0.1").getCollection("test");

	foreach (index; coll.listIndexes())
		logInfo("index %s: %s", index["name"].get!string, index);
}

Authors

Sönke Ludwig

Copyright

© 2012-2016 Sönke Ludwig

License

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