Function MongoCollection.findOne
Queries the collection for existing documents.
Prototypes
auto findOne(R, T, U)( T query, U returnFieldSelector, QueryFlags flags ); auto findOne(R, T)( T query );
Returns
By default, a Bson value of the matching document is returned, or Bson(null) when no document matched. For types R that are not Bson, the returned value is either of type R, or of type , if R is not a reference/pointer type.
Throws
Exception if a DB communication error or a query
error occured.
See Also
Authors
Sönke Ludwig
Copyright
© 2012-2014 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.