MONGOC_CLIENT_SET_READ_CONCERN(3)

πŸ’… MONGOC_CLIENT_SET_READ_CONCERN(3) ✨

okay so bestie, this is a page straight out of libmongoc and it's about one tiny function that decides how your reads behave. buckle up, it's short and sweet πŸ“


✨ SYNOPSIS ✨

void
mongoc_client_set_read_concern (mongoc_client_t *client,
                                const mongoc_read_concern_t *read_concern);

So this one sets the read concern for the client β€” that's it, that's the whole vibe. 🫢

Important though: it only affects future operations, collections, and databases inheriting from client. Like, it's not gonna time-travel backwards and fix stuff you already did, no cap. πŸ™ˆ

The default read concern is MONGOC_READ_CONCERN_LEVEL_LOCAL β€” and honestly? that's the correct read concern for the great majority of applications. lowkey iconic default behavior, we love to see it. πŸ‘‘

🚨 it is a programming error to call this function on a client from a mongoc_client_pool_t. Like, do not do it. For pooled clients, set the read concern with the MongoDB URI instead β€” that's the way, periodt. πŸ’€

πŸŽ€ PARAMETERS πŸŽ€

  • client: A mongoc_client_t. your main character client πŸ’–
  • read_concern: A mongoc_read_concern_t. the read concern vibe you're assigning ✨

🌸 AUTHOR 🌸

MongoDB, Inc β€” the whole team, fr fr 🫢

2009-present, MongoDB, Inc. πŸ’œ


and that's the whole page bestie, tysm for reading πŸŽ€βœ¨πŸ¦‹

signing off from libmongoc version 2.5.6, dated Oct 09, 2026 β€” mwah πŸ’‹

πŸ“¦ where this page comes from