Skip to content

Instantly share code, notes, and snippets.

@geoffreyp
Created July 29, 2017 20:18
Show Gist options
  • Save geoffreyp/46e44c17dc99e14432b34b438cbbfa51 to your computer and use it in GitHub Desktop.
Save geoffreyp/46e44c17dc99e14432b34b438cbbfa51 to your computer and use it in GitHub Desktop.
Select * from collection in mongodb with mongocxx
auto curs = collection.find(bsoncxx::builder::stream::document{} << bsoncxx::builder::stream::finalize);
for (auto doc: curs) {
std::cout << bsoncxx::to_json(doc) << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment