MongoDB C++ Driver mongocxx-4.0.0
|
#include <mongocxx/v_noabi/mongocxx/options/insert.hpp>
Class representing the optional arguments to a MongoDB insert operation.
Public Member Functions | |
const bsoncxx::v_noabi::stdx::optional< bool > & | bypass_document_validation () const |
Gets the current value of the bypass_document_validation option. | |
insert & | 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. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & | comment () const |
The current comment for this operation. | |
insert & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment) |
Sets the comment for this operation. | |
const bsoncxx::v_noabi::stdx::optional< bool > & | ordered () const |
The current ordered value for this operation. | |
insert & | ordered (bool ordered) |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & | write_concern () const |
The current write_concern for this operation. | |
insert & | write_concern (mongocxx::v_noabi::write_concern wc) |
Sets the write_concern for this operation. | |
const bsoncxx::v_noabi::stdx::optional< bool > & mongocxx::v_noabi::options::insert::bypass_document_validation | ( | ) | const |
Gets the current value of the bypass_document_validation option.
insert & mongocxx::v_noabi::options::insert::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.
bypass_document_validation | Whether or not to bypass document validation |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & mongocxx::v_noabi::options::insert::comment | ( | ) | const |
The current comment for this operation.
insert & mongocxx::v_noabi::options::insert::comment | ( | bsoncxx::v_noabi::types::bson_value::view_or_value | comment | ) |
Sets the comment for this operation.
comment | The new comment. |
const bsoncxx::v_noabi::stdx::optional< bool > & mongocxx::v_noabi::options::insert::ordered | ( | ) | const |
The current ordered value for this operation.
insert & mongocxx::v_noabi::options::insert::ordered | ( | bool | ordered | ) |
If true, when an insert fails, return without performing the remaining writes. If false, when a write fails, continue with the remaining writes, if any. Inserts can be performed in any order if this is false. Defaults to true.
ordered | Whether or not the insert_many will be ordered. |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & mongocxx::v_noabi::options::insert::write_concern | ( | ) | const |
The current write_concern for this operation.
insert & mongocxx::v_noabi::options::insert::write_concern | ( | mongocxx::v_noabi::write_concern | wc | ) |
Sets the write_concern for this operation.
wc | The new write_concern. |