-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Documentation
-
None
mongocxx::instance is under-documented and difficult to use correctly. We should make the following improvements to our documentation of mongocxx::instance:
- The mongocxx "Quick Start" page under "Tutorial for mongocxx" does not mention mongocxx::instance. We should add a section which explains what mongocxx::instance is, and also makes a recommendation to users on how to manage this object.
- All mongocxx examples should contain a code comment indicating that creating a mongocxx::instance object is necessary to initialize the driver.
- The class comment for instance.hpp should be expanded. In particular, it should:
- Indicate explicitly that the mongocxx::instance constructor initializes the driver and that mongocxx::instance destructor shuts down the driver.
- Explain that instantiating mongocxx::instance more than once in the same program is an error (even if the objects have non-overlapping lifetimes).
- Contain a short example of basic correct usage of mongocxx::instance.
- Contain an example of common incorrect usage of mongocxx::instance.
- Refer users to the "instance_management" example for advanced mongocxx::instance usage.
- is related to
-
CXX-1224 mongocxx::client constructor fails on Windows 7
- Closed
-
CXX-1197 Client and pool initialization should fail if no instance configured
- Closed
-
CXX-958 Am I supposed to create the instance/connection once and pass it to every function I write?
- Closed
- related to
-
CXX-890 Add an example that shows how to manage a long-lived instance object
- Closed