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

#include <mongocxx/v1/replace_one_options.hpp>

Description

Options for a "replaceOne" operation.

Supported fields include:

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

Public Member Functions

 replace_one_options ()
 Default initialization.
 replace_one_options (replace_one_options &&other) noexcept
 Move constructor.
 replace_one_options (replace_one_options const &other)
 Copy construction.
 ~replace_one_options ()
 Destroy this object.
bsoncxx::v1::stdx::optional< bool > bypass_document_validation () const
 Return the current "bypassDocumentValidation" field.
replace_one_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.
replace_one_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.
replace_one_optionscomment (bsoncxx::v1::types::value comment)
 Set the "comment" field.
bsoncxx::v1::stdx::optional< v1::hinthint () const
 Return the current "hint" field.
replace_one_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.
replace_one_optionslet (bsoncxx::v1::document::value let)
 Set the "let" field.
replace_one_optionsoperator= (replace_one_options &&other) noexcept
 Move assignment.
replace_one_optionsoperator= (replace_one_options const &other)
 Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::viewsort () const
 Return the current "sort" field.
replace_one_optionssort (bsoncxx::v1::document::value sort)
 Set the "sort" field.
bsoncxx::v1::stdx::optional< bool > upsert () const
 Return the current "upsert" field.
replace_one_optionsupsert (bool upsert)
 Set the "upsert" field.
bsoncxx::v1::stdx::optional< v1::write_concernwrite_concern () const
 Return the current "writeConcern" field.
replace_one_optionswrite_concern (v1::write_concern wc)
 Set the "writeConcern" field.

Constructor & Destructor Documentation

◆ ~replace_one_options()

mongocxx::v1::replace_one_options::~replace_one_options ( )

Destroy this object.

Warning
Invalidates all associated views.

◆ replace_one_options() [1/3]

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

Move constructor.

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

◆ replace_one_options() [2/3]

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

Copy construction.

◆ replace_one_options() [3/3]

mongocxx::v1::replace_one_options::replace_one_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::replace_one_options::bypass_document_validation ( ) const

Return the current "bypassDocumentValidation" field.

◆ bypass_document_validation() [2/2]

replace_one_options & mongocxx::v1::replace_one_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::replace_one_options::collation ( ) const

Return the current "collation" field.

◆ collation() [2/2]

replace_one_options & mongocxx::v1::replace_one_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::replace_one_options::comment ( ) const

Return the current "comment" field.

◆ comment() [2/2]

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

Set the "comment" field.

◆ hint() [1/2]

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

Return the current "hint" field.

◆ hint() [2/2]

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

Set the "hint" field.

◆ let() [1/2]

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

Return the current "let" field.

◆ let() [2/2]

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

Set the "let" field.

◆ operator=() [1/2]

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

Move assignment.

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

◆ operator=() [2/2]

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

Copy assignment.

◆ sort() [1/2]

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

Return the current "sort" field.

◆ sort() [2/2]

replace_one_options & mongocxx::v1::replace_one_options::sort ( bsoncxx::v1::document::value sort)

Set the "sort" field.

◆ upsert() [1/2]

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

Return the current "upsert" field.

◆ upsert() [2/2]

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

Set the "upsert" field.

◆ write_concern() [1/2]

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

Return the current "writeConcern" field.

◆ write_concern() [2/2]

replace_one_options & mongocxx::v1::replace_one_options::write_concern ( v1::write_concern wc)

Set the "writeConcern" field.


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