MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::find_one_and_replace_options Class Reference

#include <mongocxx/v1/find_one_and_replace_options.hpp>

Description

Options for a "findOneAndReplace" operation.

Supported fields include:

See also
Attention
This feature is experimental! It is not ready for use!

Public Member Functions

 find_one_and_replace_options ()
 Default initialization.
 find_one_and_replace_options (find_one_and_replace_options &&other) noexcept
 Move constructor.
 find_one_and_replace_options (find_one_and_replace_options const &other)
 Copy construction.
 ~find_one_and_replace_options ()
 Destroy this object.
bsoncxx::v1::stdx::optional< bool > bypass_document_validation () const
 Return the current "bypassDocumentValidation" field.
find_one_and_replace_optionsbypass_document_validation (bool bypass_document_validation)
 Set the "bypassDocumentValidation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewcollation () const
 Return the current "collation" field.
find_one_and_replace_optionscollation (bsoncxx::v1::document::value collation)
 Set the "collation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > const comment () const
 Return the current "comment" field.
find_one_and_replace_optionscomment (bsoncxx::v1::types::value comment)
 Set the "comment" field.
bsoncxx::v1::stdx::optional< v1::hinthint () const
 Return the current "hint" field.
find_one_and_replace_optionshint (v1::hint index_hint)
 Set the "hint" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > const let () const
 Return the current "let" field.
find_one_and_replace_optionslet (bsoncxx::v1::document::value let)
 Set the "let" field.
bsoncxx::v1::stdx::optional< std::chrono::milliseconds > max_time () const
 Return the current "maxTimeMS" field.
find_one_and_replace_optionsmax_time (std::chrono::milliseconds max_time)
 Set the "maxTimeMS" field.
find_one_and_replace_optionsoperator= (find_one_and_replace_options &&other) noexcept
 Move assignment.
find_one_and_replace_optionsoperator= (find_one_and_replace_options const &other)
 Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewprojection () const
 Return the current "projection" field.
find_one_and_replace_optionsprojection (bsoncxx::v1::document::value projection)
 Set the "projection" field.
bsoncxx::v1::stdx::optional< v1::return_documentreturn_document () const
 Return the current "returnDocument" field.
find_one_and_replace_optionsreturn_document (v1::return_document return_document)
 Set the "returnDocument" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewsort () const
 Return the current "sort" field.
find_one_and_replace_optionssort (bsoncxx::v1::document::value ordering)
 Set the "sort" field.
bsoncxx::v1::stdx::optional< bool > upsert () const
 Return the current "upsert" field.
find_one_and_replace_optionsupsert (bool upsert)
 Set the "upsert" field.
bsoncxx::v1::stdx::optional< v1::write_concernwrite_concern () const
 Return the current "writeConcern" field.
find_one_and_replace_optionswrite_concern (v1::write_concern write_concern)
 Set the "writeConcern" field.

Constructor & Destructor Documentation

◆ ~find_one_and_replace_options()

mongocxx::v1::find_one_and_replace_options::~find_one_and_replace_options ( )

Destroy this object.

Warning
Invalidates all associated views.

◆ find_one_and_replace_options() [1/3]

mongocxx::v1::find_one_and_replace_options::find_one_and_replace_options ( find_one_and_replace_options && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ find_one_and_replace_options() [2/3]

mongocxx::v1::find_one_and_replace_options::find_one_and_replace_options ( find_one_and_replace_options const & other)

Copy construction.

◆ find_one_and_replace_options() [3/3]

mongocxx::v1::find_one_and_replace_options::find_one_and_replace_options ( )

Default initialization.

Postconditions:
  • All supported fields are "unset" or zero-initialized.

Member Function Documentation

◆ bypass_document_validation() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::find_one_and_replace_options::bypass_document_validation ( ) const

Return the current "bypassDocumentValidation" field.

◆ bypass_document_validation() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::bypass_document_validation ( bool bypass_document_validation)

Set the "bypassDocumentValidation" field.

◆ collation() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::find_one_and_replace_options::collation ( ) const

Return the current "collation" field.

◆ collation() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::collation ( bsoncxx::v1::document::value collation)

Set the "collation" field.

◆ comment() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::types::view > const mongocxx::v1::find_one_and_replace_options::comment ( ) const

Return the current "comment" field.

◆ comment() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::comment ( bsoncxx::v1::types::value comment)

Set the "comment" field.

◆ hint() [1/2]

bsoncxx::v1::stdx::optional< v1::hint > mongocxx::v1::find_one_and_replace_options::hint ( ) const

Return the current "hint" field.

◆ hint() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::hint ( v1::hint index_hint)

Set the "hint" field.

◆ let() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > const mongocxx::v1::find_one_and_replace_options::let ( ) const

Return the current "let" field.

◆ let() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::let ( bsoncxx::v1::document::value let)

Set the "let" field.

◆ max_time() [1/2]

bsoncxx::v1::stdx::optional< std::chrono::milliseconds > mongocxx::v1::find_one_and_replace_options::max_time ( ) const

Return the current "maxTimeMS" field.

◆ max_time() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::max_time ( std::chrono::milliseconds max_time)

Set the "maxTimeMS" field.

◆ operator=() [1/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::operator= ( find_one_and_replace_options && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::operator= ( find_one_and_replace_options const & other)

Copy assignment.

◆ projection() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::find_one_and_replace_options::projection ( ) const

Return the current "projection" field.

◆ projection() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::projection ( bsoncxx::v1::document::value projection)

Set the "projection" field.

◆ return_document() [1/2]

bsoncxx::v1::stdx::optional< v1::return_document > mongocxx::v1::find_one_and_replace_options::return_document ( ) const

Return the current "returnDocument" field.

◆ return_document() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::return_document ( v1::return_document return_document)

Set the "returnDocument" field.

◆ sort() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::find_one_and_replace_options::sort ( ) const

Return the current "sort" field.

◆ sort() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::sort ( bsoncxx::v1::document::value ordering)

Set the "sort" field.

◆ upsert() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::find_one_and_replace_options::upsert ( ) const

Return the current "upsert" field.

◆ upsert() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::upsert ( bool upsert)

Set the "upsert" field.

◆ write_concern() [1/2]

bsoncxx::v1::stdx::optional< v1::write_concern > mongocxx::v1::find_one_and_replace_options::write_concern ( ) const

Return the current "writeConcern" field.

◆ write_concern() [2/2]

find_one_and_replace_options & mongocxx::v1::find_one_and_replace_options::write_concern ( v1::write_concern write_concern)

Set the "writeConcern" field.


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