1
如何从mongoDB C++驱动从Legacy升级到mongocxx-3.1.2 easly? 以下是mongocxx-3.1.2中的哪些类?将MongoDB C++驱动升级到mongocxx-3.1.2
mongo::BSONElement;
mongo::BSONObj;
mongo::BSONObjBuilder;
在此先感谢..
如何从mongoDB C++驱动从Legacy升级到mongocxx-3.1.2 easly? 以下是mongocxx-3.1.2中的哪些类?将MongoDB C++驱动升级到mongocxx-3.1.2
mongo::BSONElement;
mongo::BSONObj;
mongo::BSONObjBuilder;
在此先感谢..
没有 “升级” - 图书馆提供完全不同的API。您需要重新编写应用程序中与BSON或MongoDB交互的部分才能使用它(您还需要一个现代C++工具链)。
要了解你是想询问类型的类似物,我建议你阅读https://mongodb.github.io/mongo-cxx-driver/mongocxx-v3/working-with-bson/
完整的文档库(3.1.2)的当前稳定版本这里是可供选择:https://mongodb.github.io/mongo-cxx-driver/api/current/
为了详细在类型映射了一下你的要求:
mongo::BSONElement
是bsoncxx::document::element
mongo::BSONObj
最相似的是bsoncxx::document::value
及其相关的查看类型bsoncxx::document::view
。mongo::BSONObjBuilder
最相似的是bsoncxx::builder::basic::document
。