MongoDB C++ Driver mongocxx-3.10.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongocxx::v_noabi::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_deletecollation (bsoncxx::v_noabi::document::view_or_value collation)
 Sets the collation for this operation.
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & collation () const
 Retrieves the current collation for this operation.
 
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::v_noabi::document::view_or_value projection)
 Sets a projection that limits the fields to return.
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & projection () const
 Gets the current projection set on this operation.
 
find_one_and_deletesort (bsoncxx::v_noabi::document::view_or_value ordering)
 Sets the order to search for a matching document.
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & sort () const
 Gets the current sort ordering.
 
find_one_and_deletewrite_concern (mongocxx::v_noabi::write_concern write_concern)
 Sets the write concern for this operation.
 
const stdx::optional< mongocxx::v_noabi::write_concern > & write_concern () const
 Gets the current write concern.
 
find_one_and_deletehint (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.
 
find_one_and_deletelet (bsoncxx::v_noabi::document::view_or_value let)
 Set the value of the let option.
 
const stdx::optional< bsoncxx::v_noabi::document::view_or_valuelet () const
 Gets the current value of the let option.
 
find_one_and_deletecomment (bsoncxx::v_noabi::types::bson_value::view_or_value comment)
 Set the value of the comment option.
 
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_valuecomment () const
 Gets the current value of the comment option.
 

Detailed Description

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

Member Function Documentation

◆ collation() [1/2]

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

Retrieves the current collation for this operation.

Returns
The current collation.
See also
https://www.mongodb.com/docs/manual/reference/command/findAndModify/

◆ collation() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::collation ( bsoncxx::v_noabi::document::view_or_value  collation)

Sets the collation for this 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/command/findAndModify/

◆ comment() [1/2]

const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > mongocxx::v_noabi::options::find_one_and_delete::comment ( ) const

Gets the current value of the comment option.

Returns
The current comment option.

◆ comment() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::comment ( bsoncxx::v_noabi::types::bson_value::view_or_value  comment)

Set the value of the comment option.

Parameters
commentThe new comment option.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ hint() [1/2]

const stdx::optional< mongocxx::v_noabi::hint > & mongocxx::v_noabi::options::find_one_and_delete::hint ( ) const

Gets the current hint.

Returns
The current hint, if one is set.

◆ hint() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::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.

◆ let() [1/2]

const stdx::optional< bsoncxx::v_noabi::document::view_or_value > mongocxx::v_noabi::options::find_one_and_delete::let ( ) const

Gets the current value of the let option.

Returns
The current let option.

◆ let() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::let ( bsoncxx::v_noabi::document::view_or_value  let)

Set the value of the let option.

Parameters
letThe new let option.
Returns
A reference to the object on which this member function is being called. This facilitates method chaining.

◆ max_time() [1/2]

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

The current max_time setting.

Returns
the current max time (in milliseconds).
See also
https://www.mongodb.com/docs/manual/reference/command/findAndModify/

◆ max_time() [2/2]

find_one_and_delete & mongocxx::v_noabi::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).
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/command/findAndModify/

◆ projection() [1/2]

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

Gets the current projection set on this operation.

Returns
The current projection.
See also
https://www.mongodb.com/docs/manual/reference/command/findAndModify/

◆ projection() [2/2]

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

Sets a projection that limits the fields to return.

Parameters
projectionThe projection document.
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/command/findAndModify/

◆ sort() [1/2]

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

Gets the current sort ordering.

Returns
The current sort ordering.
See also
https://www.mongodb.com/docs/manual/reference/command/findAndModify/

◆ sort() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::sort ( bsoncxx::v_noabi::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.
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/command/findAndModify/

◆ write_concern() [1/2]

const stdx::optional< mongocxx::v_noabi::write_concern > & mongocxx::v_noabi::options::find_one_and_delete::write_concern ( ) const

Gets the current write concern.

Returns
The current write concern.
See also
https://www.mongodb.com/docs/manual/reference/command/findAndModify/

◆ write_concern() [2/2]

find_one_and_delete & mongocxx::v_noabi::options::find_one_and_delete::write_concern ( mongocxx::v_noabi::write_concern  write_concern)

Sets the write concern for this operation.

Parameters
write_concernObject representing the write concern.
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/command/findAndModify/

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