DOKK / manpages / debian 13 / libmongoc-doc / mongoc_bulkwrite_updateoneopts_set_upsert.3.en
MONGOC_BULKWRITE_UPDATEONEOPTS_SET_UPSERT(3) libmongoc MONGOC_BULKWRITE_UPDATEONEOPTS_SET_UPSERT(3)

void
mongoc_bulkwrite_updateoneopts_set_upsert (mongoc_bulkwrite_updateoneopts_t *self, bool upsert);


If upsert is true, creates a new document if no document matches the query.

The upsert option is not sent if this function is not called. The server's default value is false.

MongoDB, Inc

2009-present, MongoDB, Inc.

May 7, 2025 1.30.4