Method MongoCollection.findOne

Queries the collection for existing documents.

Prototypes

Bson findOne(T, U)(
  T query,
  U returnFieldSelector,
  QueryFlags flags
);

Bson findOne(T)(
  T query
);

Returns

the first match or null

Throws

Exception if a DB communication error or a query error occured.

See Also

http://www.mongodb.org/display/DOCS/Querying

Authors

Sönke Ludwig

Copyright

© 2012 RejectedSoftware e.K.

License

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