MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::model::delete_many Class Reference

#include <mongocxx/v_noabi/mongocxx/model/delete_many.hpp>

Description

A MongoDB delete operation that removes multiple documents.

Public Member Functions

 delete_many (bsoncxx::v_noabi::document::view_or_value filter)
 Constructs a delete operation that will delete all documents matching the filter.
 delete_many (v1::bulk_write::delete_many op)
 Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & collation () const
 Gets the collation option for this delete operation.
delete_manycollation (bsoncxx::v_noabi::document::view_or_value collation)
 Sets the collation for this delete operation.
bsoncxx::v_noabi::document::view_or_value const & filter () const
 Gets the filter for this delete operation.
bsoncxx::v_noabi::stdx::optional< v_noabi::hint > const & hint () const
 Gets the current hint.
delete_manyhint (v_noabi::hint index_hint)
 Sets the index to use for this operation.
 operator v1::bulk_write::delete_many () const
 Convert to the mongocxx::v1 equivalent.

Constructor & Destructor Documentation

◆ delete_many() [1/2]

◆ delete_many() [2/2]

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]

Gets the collation option for this delete operation.

Returns
The optional value of the collation option.
See also

◆ collation() [2/2]

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

◆ filter()

Gets the filter for this delete operation.

Returns
The filter to be used for the delete operation.

◆ hint() [1/2]

Gets the current hint.

Returns
The current hint, if one is set.

◆ hint() [2/2]

Sets the index to use for this operation.

Note
if the server already has a cached shape for this query, it may ignore a hint.
Parameters
index_hintObject representing the index to use.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ operator v1::bulk_write::delete_many()

mongocxx::v_noabi::model::delete_many::operator v1::bulk_write::delete_many ( ) const
inlineexplicit

Convert to the mongocxx::v1 equivalent.


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