MONGOC_CLIENT...SET_SERVER_API(3)

πŸ’… MONGOC_CLIENT...SET_SERVER_API(3) πŸ’…

okay so bestie, welcome to another page of the libmongoc manual (yes, that's the manual name, and yes, this function lives in it). The actual function you're here for is mongoc_client_pool_set_server_api β€” the header's just being dramatic with the whole MONGOC_CLIENT...SET_SERVER_API(3) thing. iykyk. πŸ¦‹


✨ SYNOPSIS ✨

bool
mongoc_client_pool_set_server_api (mongoc_client_pool_t *pool,
                                   const mongoc_server_api_t *api,
                                   bson_error_t *error);

So what does it do? It sets the API version to use for clients created through pool. That's the whole vibe. πŸŽ€

But here's the part where you gotta pay attention, bestie, because it's giving one-shot energy:

Once the API version is set on a pool, it may not be changed to a new value. Attempting to do so will cause this method to fail and set error. So like… pick your fave and commit, fr fr. No take-backs. 😭

🌸 PARAMETERS 🌸

  • pool: A mongoc_client_pool_t. πŸ’–
  • api: A mongoc_server_api_t. ✨
  • error: A bson_error_t. 🫢

⭐ RETURNS ⭐

Returns true if the version was successfully set, and false if not. On failure, error will be set. Simple as that β€” main character return value, no cap. πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” the icons behind all of this. πŸŽ€


Copyright 2009-present, MongoDB, Inc. periodt. πŸ’…


and that's the page!! πŸ’– this one's from libmongoc version 2.5.6, dated Oct 09, 2026 β€” go forth and set that API version exactly once, bestie, and slay. πŸ¦‹πŸ”₯πŸŽ€

πŸ“¦ where this page comes from