MongoDB C++ Driver
mongocxx-3.10.2
|
Class representing the optional arguments to a MongoDB insert operation. More...
#include <insert.hpp>
Public Member Functions | |
insert & | bypass_document_validation (bool bypass_document_validation) |
Sets the bypass_document_validation option. More... | |
const stdx::optional< bool > & | bypass_document_validation () const |
Gets the current value of the bypass_document_validation option. More... | |
insert & | write_concern (mongocxx::v_noabi::write_concern wc) |
Sets the write_concern for this operation. More... | |
const stdx::optional< mongocxx::v_noabi::write_concern > & | write_concern () const |
The current write_concern for this operation. More... | |
insert & | ordered (bool ordered) |
const stdx::optional< bool > & | ordered () const |
The current ordered value for this operation. More... | |
insert & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment) |
Sets the comment for this operation. More... | |
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > & | comment () const |
The current comment for this operation. More... | |
Class representing the optional arguments to a MongoDB insert operation.
const 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 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 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 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. |