#include <mongocxx/v_noabi/mongocxx/options/replace.hpp>
◆ bypass_document_validation() [1/2]
Gets the current value of the bypass_document_validation option.
- Returns
- The optional value of the bypass_document_validation option.
◆ bypass_document_validation() [2/2]
replace & mongocxx::v_noabi::options::replace::bypass_document_validation |
( |
bool | bypass_document_validation | ) |
|
Sets the bypass_document_validation option. If true, allows the write to opt-out of document level validation.
- Note
- On servers >= 3.2, the server applies validation by default. On servers < 3.2, this option is ignored.
- Parameters
-
bypass_document_validation | Whether or not to bypass document validation |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ collation() [1/2]
Retrieves the current collation for this operation.
- Returns
- The current collation.
- See also
-
◆ collation() [2/2]
Sets the collation for this operation.
- Parameters
-
collation | The new collation. |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
- See also
-
◆ comment() [1/2]
Gets the current value of the comment option.
- Returns
- The current comment option.
◆ comment() [2/2]
Set the value of the comment option.
- Parameters
-
comment | The new comment option. |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ hint() [1/2]
Gets the current hint.
- Returns
- The current hint, if one is set.
◆ hint() [2/2]
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_hint | Object 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]
Gets the current value of the let option.
- Returns
- The current let option.
◆ let() [2/2]
Set the value of the let option.
- Parameters
-
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ sort() [1/2]
Get the current value of the sort option.
◆ sort() [2/2]
◆ upsert() [1/2]
Gets the current value of the upsert option.
- Returns
- The optional value of the upsert option.
◆ upsert() [2/2]
replace & mongocxx::v_noabi::options::replace::upsert |
( |
bool | upsert | ) |
|
Sets the upsert option.
By default, if no document matches the filter, the replace operation does nothing. However, by specifying upsert as true
, this operation either updates matching documents or inserts a new document using the replace specification if no matching document exists.
- Parameters
-
upsert | If set to true , creates a new document when no document matches the query criteria. The server-side default is false , which does not insert a new document if a match is not found. |
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
◆ write_concern() [1/2]
◆ write_concern() [2/2]
Sets the write_concern for this operation.
- Parameters
-
- Returns
- A reference to the object on which this member function is being called. This facilitates method chaining.
- See also
-
The documentation for this class was generated from the following file: