MONGOC_URI_GET_READ_PREFS(3)
π MONGOC_URI_GET_READ_PREFS π
okay bestie, we're in the libmongoc docs and this one's a little throwback, so buckle up π
π¨ WARNING π¨
Deprecated since version 1.2.0 β please, for the love of everything, use mongoc_uri_get_read_prefs_t() instead. this one's giving vintage, and not in the cute way π
β¨ SYNOPSIS β¨
const bson_t *
mongoc_uri_get_read_prefs (const mongoc_uri_t *uri);
π§ PARAMETERS π§
uriβ amongoc_uri_t. that's the whole list, she's low maintenance π
πΈ DESCRIPTION πΈ
So the way this works: it fetches a bson document from a URI, and that document is holding all the read preference tag info. cute, right?
but bestie, heads up β this does not include the read preference mode. the mode is simply not invited to this party π
π«Ά RETURNS π«Ά
If uri has read preferences, you get back a bson document β and do not modify it, do not free it, it's not yours, hands off β (borrowed, not gifted).
Otherwise? NULL. that's it, that's the vibe π
π AUTHOR π
MongoDB, Inc β the icons themselves π«‘
π COPYRIGHT π
2009-present, MongoDB, Inc. β periodt π
and that's the whole page, bestie! this was libmongoc version 1.30.13, dated Oct 09, 2026, signing off π¦β¨ mwah π
π¦ where this page comes from
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- fedora 43: mongo-c-driver-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms