MongoDB C++ Driver
mongocxx-3.10.2
|
Class representing the optional arguments to a MongoDB bulk write. More...
#include <bulk_write.hpp>
Public Member Functions | |
bulk_write () | |
Constructs a new bulk_write object. More... | |
bulk_write & | ordered (bool ordered) |
Sets whether the writes must be executed in order by the server. More... | |
bool | ordered () const |
Gets the current value of the ordered option. More... | |
bulk_write & | 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... | |
bulk_write & | bypass_document_validation (bool bypass_document_validation) |
Set whether or not to bypass document validation for this operation. More... | |
const stdx::optional< bool > | bypass_document_validation () const |
The current setting for bypassing document validation for this operation. More... | |
bulk_write & | let (bsoncxx::v_noabi::document::view_or_value let) |
Set the value of the let option. More... | |
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > | let () const |
Gets the current value of the let option. More... | |
bulk_write & | comment (bsoncxx::v_noabi::types::bson_value::view_or_value comment) |
Set the value of the comment option. More... | |
const stdx::optional< bsoncxx::v_noabi::types::bson_value::view_or_value > | comment () const |
Gets the current value of the comment option. More... | |
Class representing the optional arguments to a MongoDB bulk write.
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 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 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 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 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. |