MongoDB C++ Driver mongocxx-4.0.0
|
#include <mongocxx/v_noabi/mongocxx/options/find_one_and_replace.hpp>
Class representing the optional arguments to a MongoDB find_and_modify replace operation.
Public Member Functions | |
const bsoncxx::v_noabi::stdx::optional< bool > & | bypass_document_validation () const |
The current setting for bypassing document validation. | |
find_one_and_replace & | bypass_document_validation (bool bypass_document_validation) |
Whether or not to bypass document validation for this operation. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & | collation () const |
Retrieves the current collation for this operation. | |
find_one_and_replace & | collation (bsoncxx::v_noabi::document::view_or_value collation) |
Sets the collation for this operation. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > | comment () const |
Gets the current value of the comment option. | |
find_one_and_replace & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment) |
Set the value of the comment option. | |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::hint > & | hint () const |
Gets the current hint. | |
find_one_and_replace & | hint (mongocxx::v_noabi::hint index_hint) |
Sets the index to use for this operation. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > | let () const |
Gets the current value of the let option. | |
find_one_and_replace & | let (bsoncxx::v_noabi::document::view_or_value let) |
Set the value of the let option. | |
const bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > & | max_time () const |
The current max_time setting. | |
find_one_and_replace & | max_time (std::chrono::milliseconds max_time) |
Sets the maximum amount of time for this operation to run (server-side) in milliseconds. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & | projection () const |
Gets the current projection for this operation. | |
find_one_and_replace & | projection (bsoncxx::v_noabi::document::view_or_value projection) |
Sets a projection, which limits the fields to return. | |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::options::return_document > & | return_document () const |
Which version of the replaced document to return. | |
find_one_and_replace & | return_document (return_document return_document) |
Set the desired version of the replaced document to return, either the original document, or the replacement. By default, the original document is returned. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & | sort () const |
Gets the current sort ordering. | |
find_one_and_replace & | sort (bsoncxx::v_noabi::document::view_or_value ordering) |
Sets the order by which to search the collection for a matching document. | |
const bsoncxx::v_noabi::stdx::optional< bool > & | upsert () const |
Gets the current upsert setting. | |
find_one_and_replace & | upsert (bool upsert) |
Sets the upsert flag on the operation. When true , the operation creates a new document if no document matches the filter. When false , this operation will do nothing if there are no matching documents. The server-side default is false. | |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & | write_concern () const |
Gets the current write concern. | |
find_one_and_replace & | write_concern (mongocxx::v_noabi::write_concern write_concern) |
Sets the write concern for this operation. | |
const bsoncxx::v_noabi::stdx::optional< bool > & mongocxx::v_noabi::options::find_one_and_replace::bypass_document_validation | ( | ) | const |
The current setting for bypassing document validation.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::bypass_document_validation | ( | bool | bypass_document_validation | ) |
Whether or not to bypass document validation for this operation.
bypass_document_validation | Whether or not to bypass document validation. |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & mongocxx::v_noabi::options::find_one_and_replace::collation | ( | ) | const |
Retrieves the current collation for this operation.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::collation | ( | bsoncxx::v_noabi::document::view_or_value | collation | ) |
Sets the collation for this operation.
collation | The new collation. |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > mongocxx::v_noabi::options::find_one_and_replace::comment | ( | ) | const |
Gets the current value of the comment option.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::comment | ( | bsoncxx::v_noabi::types::bson_value::view_or_value | comment | ) |
Set the value of the comment option.
comment | The new comment option. |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::hint > & mongocxx::v_noabi::options::find_one_and_replace::hint | ( | ) | const |
Gets the current hint.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::hint | ( | mongocxx::v_noabi::hint | index_hint | ) |
Sets the index to use for this operation.
index_hint | Object representing the index to use. |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > mongocxx::v_noabi::options::find_one_and_replace::let | ( | ) | const |
Gets the current value of the let option.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::let | ( | bsoncxx::v_noabi::document::view_or_value | let | ) |
Set the value of the let option.
let | The new let option. |
const bsoncxx::v_noabi::stdx::optional< std::chrono::milliseconds > & mongocxx::v_noabi::options::find_one_and_replace::max_time | ( | ) | const |
The current max_time setting.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::max_time | ( | std::chrono::milliseconds | max_time | ) |
Sets the maximum amount of time for this operation to run (server-side) in milliseconds.
max_time | The max amount of time (in milliseconds). |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & mongocxx::v_noabi::options::find_one_and_replace::projection | ( | ) | const |
Gets the current projection for this operation.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::projection | ( | bsoncxx::v_noabi::document::view_or_value | projection | ) |
Sets a projection, which limits the fields to return.
projection | The projection document. |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::options::return_document > & mongocxx::v_noabi::options::find_one_and_replace::return_document | ( | ) | const |
Which version of the replaced document to return.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::return_document | ( | return_document | return_document | ) |
Set the desired version of the replaced document to return, either the original document, or the replacement. By default, the original document is returned.
return_document | Version of document to return, either original or replaced. |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > & mongocxx::v_noabi::options::find_one_and_replace::sort | ( | ) | const |
Gets the current sort ordering.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::sort | ( | bsoncxx::v_noabi::document::view_or_value | ordering | ) |
Sets the order by which to search the collection for a matching document.
ordering | Document describing the order of the documents to be returned. |
const bsoncxx::v_noabi::stdx::optional< bool > & mongocxx::v_noabi::options::find_one_and_replace::upsert | ( | ) | const |
Gets the current upsert setting.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::upsert | ( | bool | upsert | ) |
Sets the upsert flag on the operation. When true
, the operation creates a new document if no document matches the filter. When false
, this operation will do nothing if there are no matching documents. The server-side default is false.
upsert | Whether or not to perform an upsert. |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & mongocxx::v_noabi::options::find_one_and_replace::write_concern | ( | ) | const |
Gets the current write concern.
find_one_and_replace & mongocxx::v_noabi::options::find_one_and_replace::write_concern | ( | mongocxx::v_noabi::write_concern | write_concern | ) |
Sets the write concern for this operation.
write_concern | Object representing the write concern. |