MongoDB C++ Driver mongocxx-3.0.3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongocxx::options::find_one_and_delete Class Reference

Class representing the optional arguments to a MongoDB find_and_modify delete operation. More...

#include <find_one_and_delete.hpp>

Public Member Functions

find_one_and_deletemax_time (std::chrono::milliseconds max_time)
 Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
 
const stdx::optional< std::chrono::milliseconds > & max_time () const
 The current max_time setting.
 
find_one_and_deleteprojection (bsoncxx::document::view_or_value projection)
 Sets a projection that limits the fields to return.
 
const stdx::optional< bsoncxx::document::view_or_value > & projection () const
 Gets the current projection set on this operation.
 
find_one_and_deletesort (bsoncxx::document::view_or_value ordering)
 Sets the order to search for a matching document.
 
const stdx::optional< bsoncxx::document::view_or_value > & sort () const
 Gets the current sort ordering.
 

Detailed Description

Class representing the optional arguments to a MongoDB find_and_modify delete operation.

Member Function Documentation

◆ max_time() [1/2]

const stdx::optional< std::chrono::milliseconds > & mongocxx::options::find_one_and_delete::max_time ( ) const

The current max_time setting.

Returns
the current max time (in milliseconds).
See also
http://docs.mongodb.org/manual/reference/operator/meta/maxTimeMS

◆ max_time() [2/2]

find_one_and_delete & mongocxx::options::find_one_and_delete::max_time ( std::chrono::milliseconds  max_time)

Sets the maximum amount of time for this operation to run (server-side) in milliseconds.

Parameters
max_timeThe max amount of running time (in milliseconds).
See also
http://docs.mongodb.org/manual/reference/operator/meta/maxTimeMS

◆ projection() [1/2]

const stdx::optional< bsoncxx::document::view_or_value > & mongocxx::options::find_one_and_delete::projection ( ) const

Gets the current projection set on this operation.

Returns
The current projection.
See also
http://docs.mongodb.org/manual/tutorial/project-fields-from-query-results/

◆ projection() [2/2]

find_one_and_delete & mongocxx::options::find_one_and_delete::projection ( bsoncxx::document::view_or_value  projection)

Sets a projection that limits the fields to return.

Parameters
projectionThe projection document.
See also
http://docs.mongodb.org/manual/tutorial/project-fields-from-query-results/

◆ sort() [1/2]

const stdx::optional< bsoncxx::document::view_or_value > & mongocxx::options::find_one_and_delete::sort ( ) const

Gets the current sort ordering.

Returns
The current sort ordering.
See also
http://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/

◆ sort() [2/2]

find_one_and_delete & mongocxx::options::find_one_and_delete::sort ( bsoncxx::document::view_or_value  ordering)

Sets the order to search for a matching document.

Warning
This can influence which document the operation modifies if the provided filter selects multiple documents.
Parameters
orderingDocument describing the order of the documents to be returned.
See also
http://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/

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