MongoDB C++ Driver
legacy-1.1.2
|
Class for constructing bulk write operations which have an applied filter and are to be performed as an upsert. More...
#include <bulk_upsert_builder.h>
Public Member Functions | |
void | updateOne (const BSONObj &update) |
Enqueues an operation which updates a single document matching the selector by applying the supplied update document. More... | |
void | update (const BSONObj &update) |
Enqueues an operation which updates any document matching the selector by applying the supplied update document. More... | |
void | replaceOne (const BSONObj &replacement) |
Enqueues an operation which replaces a single document matching the selector with the supplied replacement. More... | |
Class for constructing bulk write operations which have an applied filter and are to be performed as an upsert.
Not to be instantiated directly. Comes into being via the upsert() method on BulkWriteOperation.
void mongo::BulkUpsertBuilder::replaceOne | ( | const BSONObj & | replacement | ) |
Enqueues an operation which replaces a single document matching the selector with the supplied replacement.
If no matching document exists, the operation becomes an insert.
void mongo::BulkUpsertBuilder::update | ( | const BSONObj & | update | ) |
Enqueues an operation which updates any document matching the selector by applying the supplied update document.
If no matching document exists, the operation becomes an insert.
update | The update to apply to matching documents. |
void mongo::BulkUpsertBuilder::updateOne | ( | const BSONObj & | update | ) |
Enqueues an operation which updates a single document matching the selector by applying the supplied update document.
If no matching document exists, the operation becomes an insert.
update | The update to apply to matching documents. |