MongoDB C++ Driver mongocxx-4.0.0
|
#include <mongocxx/v_noabi/mongocxx/options/bulk_write.hpp>
Class representing the optional arguments to a MongoDB bulk write.
Public Member Functions | |
bulk_write () | |
Constructs a new bulk_write object. By default, bulk writes are considered ordered as this is the only safe choice. If you want an unordered update, you must call ordered(false) to switch to unordered mode. | |
const bsoncxx::v_noabi::stdx::optional< bool > | bypass_document_validation () const |
The current setting for bypassing document validation for this operation. | |
bulk_write & | bypass_document_validation (bool bypass_document_validation) |
Set whether or not to bypass document validation 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. | |
bulk_write & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment) |
Set the value of the comment option. | |
const bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > | let () const |
Gets the current value of the let option. | |
bulk_write & | let (bsoncxx::v_noabi::document::view_or_value let) |
Set the value of the let option. | |
bool | ordered () const |
Gets the current value of the ordered option. | |
bulk_write & | ordered (bool ordered) |
Sets whether the writes must be executed in order by the server. | |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & | write_concern () const |
The current write_concern for this operation. | |
bulk_write & | write_concern (mongocxx::v_noabi::write_concern wc) |
Sets the write_concern for this operation. | |
mongocxx::v_noabi::options::bulk_write::bulk_write | ( | ) |
Constructs a new bulk_write object. By default, bulk writes are considered ordered as this is the only safe choice. If you want an unordered update, you must call ordered(false) to switch to unordered mode.
const bsoncxx::v_noabi::stdx::optional< bool > mongocxx::v_noabi::options::bulk_write::bypass_document_validation | ( | ) | const |
The current setting for bypassing document validation for this operation.
bulk_write & mongocxx::v_noabi::options::bulk_write::bypass_document_validation | ( | bool | bypass_document_validation | ) |
Set 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::types::bson_value::view_or_value > mongocxx::v_noabi::options::bulk_write::comment | ( | ) | const |
Gets the current value of the comment option.
bulk_write & mongocxx::v_noabi::options::bulk_write::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< bsoncxx::v_noabi::document::view_or_value > mongocxx::v_noabi::options::bulk_write::let | ( | ) | const |
Gets the current value of the let option.
bulk_write & mongocxx::v_noabi::options::bulk_write::let | ( | bsoncxx::v_noabi::document::view_or_value | let | ) |
Set the value of the let option.
let | The new let option. |
bool mongocxx::v_noabi::options::bulk_write::ordered | ( | ) | const |
Gets the current value of the ordered option.
bulk_write & mongocxx::v_noabi::options::bulk_write::ordered | ( | bool | ordered | ) |
Sets whether the writes must be executed in order by the server.
The server-side default is true
.
ordered | If true all write operations will be executed serially in the order they were appended, and the entire bulk operation will abort on the first error. If false operations will be executed in arbitrary order (possibly in parallel on the server) and any errors will be reported after attempting all operations. |
const bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::write_concern > & mongocxx::v_noabi::options::bulk_write::write_concern | ( | ) | const |
The current write_concern for this operation.
bulk_write & mongocxx::v_noabi::options::bulk_write::write_concern | ( | mongocxx::v_noabi::write_concern | wc | ) |
Sets the write_concern for this operation.
wc | The new write_concern. |