MongoDB C++ Driver  legacy-1.1.2
Public Member Functions | List of all members
mongo::BulkUpsertBuilder Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
updateThe 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.

Parameters
updateThe update to apply to matching documents.

The documentation for this class was generated from the following file: