MONGOC_URI_SET_READ_PREFS_T(3)

πŸ’… MONGOC_URI_SET_READ_PREFS_T ✨

okay so this is one of those lil libmongoc functions, bestie β€” like the mongoc_uri_set_read_prefs_t one? yeah. she's small. she's iconic. she does exactly one (1) thing and she does it flawlessly. 🫢


🌸 SYNOPSIS 🌸

void
mongoc_uri_set_read_prefs_t (mongoc_uri_t *uri,
                             const mongoc_read_prefs_t *prefs);

literally the whole function signature, verbatim, no notes. 😌


πŸŽ€ PARAMETERS πŸŽ€

  • uri β€” a mongoc_uri_t. that's the URI, the vibe holder, the main character of this whole situation. πŸ‘‘
  • rc β€” a mongoc_read_prefs_t. yes, the doc says rc, not prefs β€” that's their naming, not mine, and I am not touching it. fr fr. πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this function sets a MongoDB URI's read preferences. ✨

But β€” and this is the part people miss β€” it does that after the URI has already been parsed from a string. like, the URI's been through the whole "string β†’ mongoc_uri_t" glow-up already, and now you're coming back in with your read prefs and being like "hey bestie, one more thing." πŸ’…


⭐ AUTHOR ⭐

MongoDB, Inc β€” the whole entire company. πŸ˜­πŸ‘‘


2009-present, MongoDB, Inc. β€” no cap, that's the real line, don't come for me. πŸ“


and that's the page, bestie! πŸ§šβ€β™€οΈ this little gem comes from libmongoc version 2.5.6, dated Oct 09, 2026 β€” so go forth and set those read prefs, mwah πŸ’–πŸ”₯

πŸ“¦ where this page comes from