MongoCollection.find

Queries the collection for existing documents.

If no arguments are passed to find(), all documents of the collection will be returned.

  1. MongoCursor!R find(T query, U returnFieldSelector, QueryFlags flags, int num_skip, int num_docs_per_chunk)
  2. MongoCursor!R find(T query, U projection, FindOptions options)
  3. MongoCursor!R find(Q query, FindOptions options)
    struct MongoCollection
    MongoCursor!R
    find
    (
    R = Bson
    Q
    )
    (,
    FindOptions options = FindOptions.init
    )
  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"
	coll.find(["status": "A"]);
}

See Also

Meta