如何将 gridfs 与 mongo-cxx-driver 一起使用

How to use gridfs with the mongo-cxx-driver

我想在我的应用程序中使用 mongo-cxx-driver,但找不到使用 mongodb 的 gridfs 功能的方法。 我认为 mongodb-cxx-driver (3.0.2) 的当前稳定版本仍然不支持 gridfs,因此我必须使用 mongo-c-driver。那正确吗? 如果是这样,有没有办法使用 mongo-cxx-driver 的当前连接(因为 cxx 只是 c 客户端的包装器)来使用 API mongo-c-driver使用gridfs特性?

你是对的,mongo C++11 驱动程序还不支持 GridFS,但它即将到来。

请参阅问题 CXX-1130: Implement GridFS spec, the linked implementation user stories and the proposed spec