MONGOC_CLIENT_SET_SERVER_API(3)

πŸ’… MONGOC_CLIENT_SET_SERVER_API(3) πŸ’…

okay so bestie, this is the libmongoc manual page for mongoc_client_set_server_api β€” and yes, it’s giving β€œset it once and don’t touch it again” energy 😭✨

πŸ’– SYNOPSIS πŸ’–

          bool
          mongoc_client_set_server_api (mongoc_client_t *client,
                                        const mongoc_server_api_t *api,
                                        bson_error_t *error);

This function sets the API version to use for client. Once the API version is set on a client, it may not be changed to a new value. Attempting to do so will cause this method to fail and set error. periodt. πŸ’…

πŸŽ€ PARAMETERS πŸŽ€

  • client β€” a mongoc_client_t. the client we’re setting up, slay 🫢
  • api β€” a mongoc_server_api_t. the API version situation itself ✨
  • error β€” a bson_error_t. where the error gets dropped if things go sideways πŸ™ˆ

✨ RETURNS ✨

True if the version was successfully set, false if not. On failure, error will be set. simple as that, bestie πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


and that’s the whole vibe πŸ’« this iconic little page comes from libmongoc version 2.5.6, dated Oct 09, 2026. mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from