MONGOC_BULK_OPERATION_EXECUTE(3)
okay bestie, welcome to the libmongoc docs π this page is all about mongoc_bulk_operation_execute() β the moment all your queued-up bulk ops finally get their main character moment. π
β¨ SYNOPSIS β¨
uint32_t
mongoc_bulk_operation_execute (mongoc_bulk_operation_t *bulk,
bson_t *reply,
bson_error_t *error);
This function executes all operations queued into the bulk operation. Unless ordered: false was specified in the opts passed to mongoc_collection_create_bulk_operation_with_opts(), then forward progress will be stopped upon the first error. π
It is only valid to call mongoc_bulk_operation_execute() once on the same mongoc_bulk_operation_t. Calling repeatedly results in error. Call mongoc_bulk_operation_destroy() to destroy bulk afterwards. π«Ά
Changed in version 2.0.0: Calling mongoc_bulk_operation_execute() repeatedly results in an error. β οΈ
WARNING:replyis always initialized, even upon failure. Callers must callbson_destroy()to release this potential allocation. ππΈ
πΈ PARAMETERS πΈ
bulkβ Amongoc_bulk_operation_t. The bulk operation itself, living its best life. πreplyβ A maybe-NULLpointer to overwritable storage for abson_tto contain the results. πerrorβ An optional location for abson_error_torNULL. π¦
π ERRORS π
Errors are propagated via the error parameter. No cap. π¬
β RETURNS β
On success, returns the server id used. On failure, returns 0 and sets error. π
A write concern timeout or write concern error is considered a failure. π¨
The reply document counts operations and collects error information. See Bulk Write Operations for examples. π
π SEE ALSO π
- Bulk Write Operations
mongoc_bulk_operation_get_server_id(), which gets the id of the server used even if the operation failed. π΅οΈββοΈ
π§ AUTHOR π§
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
okay that's the whole page, bestie β brought to you by libmongoc version 2.5.6, dated Oct 09, 2026, and still titled MONGOC_BULK_OPERATION_EXECUTE(3) because we keep the lore intact. periodt. πβ¨
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms