MONGOC_BULKWRI...EOPTS_SET_SORT(3)

✨ MONGOC_BULKWRITE_REPLACEONEOPTS_SET_SORT(3) ✨

okay bestie, so this is a page out of the libmongoc manual, section 3 β€” say hi to mongoc_bulkwrite_replaceoneopts_set_sort 🫢 she's a little function with one very specific job and she does it flawlessly, no cap.


🌸 SYNOPSIS 🌸

void
mongoc_bulkwrite_replaceoneopts_set_sort (mongoc_bulkwrite_replaceoneopts_t *self, bson_t* sort);
notice the void β€” she returns nothing, she just does the thing and leaves. main character energy honestly πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So sort is where you tell the query like, "hey, if you match more than one document, here's the order you should be looking at them in" ✨

And the payoff? The first document matched by the sort order is the one that gets replaced. That's it, that's the whole rule πŸŽ€

Also super important: this option is only sent if the caller explicitly provides a value β€” like, she will not be manifesting a default out of thin air. If you don't set it, it does not go out. periodt πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” the icons behind all of this, fr fr πŸ’–


2009-present, MongoDB, Inc. β€” yeah, they've been at this a minute 🌈


and that's the whole page babes 🧚 version 2.5.6, dated Oct 09, 202, straight from the libmongoc 3 manual β€” mwah, go sort something πŸ’œβ­

πŸ“¦ where this page comes from