如何为客户端更改mongocxx文件?

时间:2018-03-07 11:05:12

标签: mongodb field document mongo-cxx-driver

auto cur = collection.find(make_document(kvp("userId", uid)), findOptions);
        auto collects = bsoncxx::builder::basic::array{};

        for (auto &&doc : cur) {
            doc["time"] = "some new value";  // this line can't execute
            collects.append(doc);
        }
response_success(req, collects);

我想更改doc time字段值,以便将收集返回给客户端。但我发现没有接口可以从mongocxx调用。

谁能告诉我该怎么办?谢谢!

0 个答案:

没有答案