MongoDB C++ Driver mongocxx-3.10.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongocxx::v_noabi::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::v_noabi::document::view_or_value filter)
 Constructs a delete operation that will delete all documents matching the filter.
 
const bsoncxx::v_noabi::document::view_or_valuefilter () const
 Gets the filter for this delete operation.
 
delete_manycollation (bsoncxx::v_noabi::document::view_or_value collation)
 Sets the collation for this delete operation.
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & collation () const
 Gets the collation option for this delete operation.
 
delete_manyhint (mongocxx::v_noabi::hint index_hint)
 Sets the index to use for this operation.
 
const stdx::optional< mongocxx::v_noabi::hint > & hint () const
 Gets the current hint.
 

Detailed Description

Class representing a MongoDB delete operation that removes multiple documents.

Constructor & Destructor Documentation

◆ delete_many()

mongocxx::v_noabi::model::delete_many::delete_many ( bsoncxx::v_noabi::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]

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

Gets the collation option for this delete operation.

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

◆ collation() [2/2]

delete_many & mongocxx::v_noabi::model::delete_many::collation ( bsoncxx::v_noabi::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://www.mongodb.com/docs/manual/reference/collation/

◆ filter()

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

Gets the filter for this delete operation.

Returns
The filter to be used for the delete operation.

◆ hint() [1/2]

const stdx::optional< mongocxx::v_noabi::hint > & mongocxx::v_noabi::model::delete_many::hint ( ) const

Gets the current hint.

Returns
The current hint, if one is set.

◆ hint() [2/2]

delete_many & mongocxx::v_noabi::model::delete_many::hint ( mongocxx::v_noabi::hint  index_hint)

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.

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