MONGOC_COLLECTION_INSERT_BULK(3)
π¨ WARNING π¨
okay bestie, sit down for this one π
Deprecated since version 1.9.0: Use mongoc_collection_insert_many() instead.
like, she's retired, she's on a lil vacation, she is NOT the one you want anymore. π
β¨ SYNOPSIS β¨
bool
mongoc_collection_insert_bulk (mongoc_collection_t *collection,
mongoc_insert_flags_t flags,
const bson_t **documents,
uint32_t n_documents,
const mongoc_write_concern_t *write_concern,
bson_error_t *error);
this is mongoc_collection_insert_bulk, living in <strong>libmongoc</strong>, and yes she is still here, still in the docs, still deprecated. periodt. π
πΈ PARAMETERS πΈ
collectionβ amongoc_collection_t. the collection, the moment, the place where it all goes down. πflagsβ a bitwise or ofmongoc_insert_flags_t. stack those flags up, babes. π₯documentsβ an array ofbson_t. the whole lil squad of documents. πn_documentsβ the number of documents indocuments. yes queen, we count them. π’write_concernβ amongoc_write_concern_torNULL. you can passNULL, she won't be mad. π¦errorβ an optional location for abson_error_torNULL. optional bestie, but if you want the tea, hand her a place to spill it. β
π¦ DESCRIPTION π¦
So the vibe is: this function performs a bulk insert of all of the documents in documents. all of them!! at once!! iconic!! β¨
BUT β and this is the big but β this function is deprecated because it cannot accurately return which documents may have failed during the bulk insert. she just can't tell you who did what. the receipts are lost. π
π ERRORS π
Errors are propagated via the error parameter. π«Ά
A <strong>write concern timeout</strong> or <strong>write concern error</strong> is considered a failure. no cap, that counts as a fail, don't let anyone gaslight you into thinking otherwise. π
π RETURNS π
- Returns
trueif successful. slay!! π - Returns
falseand setserrorif there are invalid arguments or a server or network error. oof. π that's a no from her. π
π AUTHOR π
MongoDB, Inc the icons themselves, lowkey the main characters of this whole story. π
π COPYRIGHT π
2009-present, MongoDB, Inc. holding it down since 2009, fr fr. β¨
and that's the whole page bestie!! π this was libmongoc version 1.30.13, dated Oct 09, 2026, and she's serving deprecated-but-still-documented energy till the very end. go use mongoc_collection_insert_many() instead, iykyk!! π
πβ¨ π¦πΈππ«Ά
π¦ where this page comes from
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms