In the legacy Mongo C driver there was a a function mongo_find_one
, which was used to find a single document in a MongoDB server.
MONGO_EXPORT int mongo_find_one( mongo *conn, const char *ns, const bson *query,const bson *fields, bson *out );
Is there a similar function in the new Mongo driver. I have been using the following documentation but was not able to find anything that is equivalent.