Details
-
Task
-
Resolution: Done
-
Minor - P4
-
None
-
legacy-0.0-26compat-2.6.3
-
RH linux 64bit, MONGODB Enterpise version.
Description
The only example we have so far is
Configuration of the driver is managed through a new class, added in the legacy-0.9.0 release, called Options. This class is hosted in the mongo::client namespace, and is defined in the header mongo/client/options.h.
Passing an instance to mongo::client::initialize
By default, calling mongo::client::initialize() with no parameters is equivalent to calling mongo::client::initialize(mongo::client::Options()) passing a default constructed mongo::client::Options object.
Because the mongo::client::Options class has setters returning a mongo::client::Options& you can chain together options to easily configure them at the call site:
using mongo::client::initialize;
using mongo::client::Options;
// Configure the mongo C++ client driver, enabling SSL and setting
// the SSL Certificate Authority file to "mycafile".
Status status = initialize(
Options().setSSLMode(Options:kSSLModeRequired).setSSLCAFile("mycafile")
);
And this complains that mongo/client/options.h is not found.
Please provide example of how similar thing can be done with mongo-cxx-driver-legacy-0.0-26compat-2.6.3