MongoDB C++ Driver
mongocxx-3.7.0
|
Class representing a MongoDB delete operation that removes a single document. More...
#include <delete_one.hpp>
Public Member Functions | |
delete_one (bsoncxx::document::view_or_value filter) | |
Constructs a delete operation that will delete the first document matching the filter. More... | |
const bsoncxx::document::view_or_value & | filter () const |
Gets the filter on this delete operation. More... | |
delete_one & | collation (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... | |
delete_one & | hint (class hint index_hint) |
Sets the index to use for this operation. More... | |
const stdx::optional< class hint > & | hint () const |
Gets the current hint. More... | |
Class representing a MongoDB delete operation that removes a single document.
mongocxx::model::delete_one::delete_one | ( | bsoncxx::document::view_or_value | filter | ) |
Constructs a delete operation that will delete the first document matching the filter.
filter | Document representing the criteria for deletion. |
const stdx::optional<bsoncxx::document::view_or_value>& mongocxx::model::delete_one::collation | ( | ) | const |
Gets the collation option for this delete operation.
delete_one& mongocxx::model::delete_one::collation | ( | bsoncxx::document::view_or_value | collation | ) |
Sets the collation for this delete operation.
collation | The new collation. |
const bsoncxx::document::view_or_value& mongocxx::model::delete_one::filter | ( | ) | const |
Gets the filter on this delete operation.
const stdx::optional<class hint>& mongocxx::model::delete_one::hint | ( | ) | const |
Gets the current hint.
delete_one& mongocxx::model::delete_one::hint | ( | class hint | index_hint | ) |
Sets the index to use for this operation.
index_hint | Object representing the index to use. |