MONGOC_BULKWRI..._UPDATERESULTS(3)

πŸ’… MONGOC_BULKWRI..._UPDATERESULTS(3) πŸ’…

okay so bestie, you're in the libmongoc girlies' corner of the manual pages now β€” this one's all about a function with a name so long it got its own abbreviation. no cap.


✨ SYNOPSIS ✨

const bson_t *
mongoc_bulkwriteresult_updateresults (const mongoc_bulkwriteresult_t *self);

like, she takes one argument and gives you back a const bson_t *. that's the whole vibe.


🌸 DESCRIPTION 🌸

so this function hands you the results of every single individual update operation that was successfully performed. that's it, that's the whole job. πŸ’–

here's what it looks like in practice, fr fr:

{
  "0" : { "matchedCount" : 2, "modifiedCount" : 2 },
  "1" : { "matchedCount" : 1, "modifiedCount" : 0, "upsertedId" : "foo" }
}

look at those lil numbered keys β€” "0" and "1" β€” each one carrying its own matchedCount, modifiedCount, and sometimes a little upsertedId moment. iconic.

⚠️ heads up bestie: this returns NULL if verbose results were not requested. she's not gonna manifest data that was never asked for, sorry 😭

you can turn on verbose results with mongoc_bulkwriteopts_set_verboseresults(). that's the switch. flip it. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” yeah, that's the one. the whole crew.


2009-present, MongoDB, Inc. β€” the legacy is long and the legacy is real.


okay that's the whole page, no notes πŸ’…βœ¨ version 2.5.6, dated Oct 09 β€” mwah, go forth and check your update results bestie πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from