MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongo::BulkUpdateBuilder Class Reference

Class for constructing bulk write operations which have an applied filter. More...

#include <bulk_update_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.
 
void remove ()
 Enqueues an operation which removes any document matching the selector.
 
void removeOne ()
 Enqueues an operation which removes a single document matching the selector.
 
BulkUpsertBuilder upsert ()
 Specifies that this write operation will be an upsert.
 

Detailed Description

Class for constructing bulk write operations which have an applied filter.

Not to be instantiated directly. Comes into being via the find() method on BulkOperationBuilder.

Member Function Documentation

◆ update()

void mongo::BulkUpdateBuilder::update ( const BSONObj update)

Enqueues an operation which updates any document matching the selector by applying the supplied update document.

Parameters
updateThe update to apply to matching documents.

◆ updateOne()

void mongo::BulkUpdateBuilder::updateOne ( const BSONObj update)

Enqueues an operation which updates a single document matching the selector by applying the supplied update document.

Parameters
updateThe update to apply to matching documents.

◆ upsert()

BulkUpsertBuilder mongo::BulkUpdateBuilder::upsert ( )

Specifies that this write operation will be an upsert.

Returns
BulkUpsertOperation A BulkUpdateBuilder that is an upsert.

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