MONGOC_BULKWRI...YOPTS_SET_HINT(3)
π mongoc_bulkwrite_updatemanyopts_set_hint(3) π
okay so bestie, welcome to libmongoc β yes, the C driver, yes we're doing this, and yes you're gonna slay it. this page is all about mongoc_bulkwrite_updatemanyopts_set_hint, which is a tiny little setter with main character energy. let's get into it π«Ά
β¨ SYNOPSIS β¨
void
mongoc_bulkwrite_updatemanyopts_set_hint (mongoc_bulkwrite_updatemanyopts_t *self, const bson_value_t *hint);
that's the whole vibe: no return value, just void, because this function is too iconic to hand anything back. it takes self (your update-many options, the star of the show π) and hint (a const bson_value_t *, the supporting cast member doing the actual work).
πΈ DESCRIPTION πΈ
this is the "tell the server which index to use, bestie" function. literally its whole job. π
you call it to specify the index to use. and because the universe loves options, you get two adorable ways to say it:
- pass the index name as a string π
- or pass the index key pattern π¦
and here's the part that actually matters, no cap: if specified, then the query system will only consider plans using the hinted index. only that one. not the others. the others are not invited to the party π«β¨
ngl, this is a hint and not a command, but the query planner takes it very seriously β it will only consider plans that use the hinted index once you've set one. that's exactly what the page says and i'm not making it up, promise π
π AUTHOR π
MongoDB, Inc
(actual legends, fr fr π)
π COPYRIGHT π
2009-present, MongoDB, Inc.
okay that's the whole page, you ate that πβ¨ β and for the sign-off, the credit where it's due: this is libmongoc version 2.5.6, dated Oct 09, 202β¦ which is where the header ran into the footer and cut the poor thing off π (you've seen the last line, you know the vibe β the date just ran out of runway). love that for us. bye bestie, go hint some indexes ππ¦
π¦ 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