I’m attempting to use the Instance Management Example with the mongocxx driver in an application. I’m having trouble getting the syntax to actually access a database collection. In the do_work() method, how would one use the local connection var to get data from a collection?
I’ve tried variations of
mongocxx::client& client = *connection; auto coll = (*client)["infoscan"]["points"];
but can’t seem to come up with the right approach.