MongoCollection.find

Undocumented in source. Be warned that the author may not have intended to support it.
  1. MongoCursor!R find(T query, U returnFieldSelector, QueryFlags flags, int num_skip, int num_docs_per_chunk)
    struct MongoCollection
    deprecated
    MongoCursor!R
    find
    (
    R = Bson
    T
    U
    )
    (,,
    QueryFlags flags
    ,
    int num_skip = 0
    ,)
  2. MongoCursor!R find(T query, U projection, FindOptions options)
  3. MongoCursor!R find(Q query, FindOptions options)
  4. MongoCursor!R find()

Examples

import vibe.db.mongo.mongo;

void test()
{
	auto coll = connectMongoDB("127.0.0.1").getCollection("test");
	// find documents with status == "A"
	auto x = coll.find(["status": "A"], ["status": true], QueryFlags.none);
	foreach (item; x)
	{
		// only for legacy overload
	}
}

Meta