MongoDB C++ Driver  mongocxx-3.4.0
Public Member Functions | List of all members
mongocxx::model::delete_many Class Reference

Class representing a MongoDB delete operation that removes multiple documents. More...

#include <delete_many.hpp>

Public Member Functions

 delete_many (bsoncxx::document::view_or_value filter)
 Constructs a delete operation that will delete all documents matching the filter. More...
 
const bsoncxx::document::view_or_valuefilter () const
 Gets the filter for this delete operation. More...
 
delete_manycollation (bsoncxx::document::view_or_value collation)
 Sets the collation for this delete operation. More...
 
const stdx::optional< bsoncxx::document::view_or_value > & collation () const
 Gets the collation option for this delete operation. More...
 

Detailed Description

Class representing a MongoDB delete operation that removes multiple documents.

Constructor & Destructor Documentation

◆ delete_many()

mongocxx::model::delete_many::delete_many ( bsoncxx::document::view_or_value  filter)
explicit

Constructs a delete operation that will delete all documents matching the filter.

Parameters
filterDocument representing the criteria for deletion.

Member Function Documentation

◆ collation() [1/2]

delete_many& mongocxx::model::delete_many::collation ( bsoncxx::document::view_or_value  collation)

Sets the collation for this delete operation.

Parameters
collationThe new collation.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.
See also
https://docs.mongodb.com/master/reference/collation/

◆ collation() [2/2]

const stdx::optional<bsoncxx::document::view_or_value>& mongocxx::model::delete_many::collation ( ) const

Gets the collation option for this delete operation.

Returns
The optional value of the collation option.
See also
https://docs.mongodb.com/master/reference/collation/

◆ filter()

const bsoncxx::document::view_or_value& mongocxx::model::delete_many::filter ( ) const

Gets the filter for this delete operation.

Returns
The filter to be used for the delete operation.

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