MONGOC_BULKWRI...PTS_SET_UPSERT(3)
π MONGOC_BULKWRI...PTS_SET_UPSERT(3) π
okay bestie, welcome to the libmongoc manual page for mongoc_bulkwrite_updatemanyopts_set_upsert β it's giving tiny setter, big upsert energy β¨
β¨ SYNOPSIS β¨
void
mongoc_bulkwrite_updatemanyopts_set_upsert (mongoc_bulkwrite_updatemanyopts_t *self, bool upsert);
π DESCRIPTION π
So you've got your mongoc_bulkwrite_updatemanyopts_t *self and you're setting the upsert bool. If upsert is true, then a new document gets created if no document matches the query. Slay. That's the whole vibe.
π«Ά Important little note: theupsertoption is not sent if this function is not called. And the server's default value isfalse. So no call = no upsert option sent, and the server falls back tofalse. iykyk.
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
xoxo π β this was libmongoc version 2.5.6, dated Oct 09, 202 πΈ
π¦ 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