MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
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.
 
void update (const BSONObj &update)
 Enqueues an operation which updates any document matching the selector by applying the supplied update document.
 
void replaceOne (const BSONObj &replacement)
 Enqueues an operation which replaces a single document matching the selector with the supplied replacement.
 

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

◆ replaceOne()

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.

◆ update()

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.

◆ updateOne()

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: