MONGOC_CLIENT_GET_MAX_BSON_SIZE(3)

πŸ“¦
version 1.23.1 Β· 2 versions
, in debian bookworm

πŸ’… MONGOC_CLIENT_GET_MAX_BSON_SIZE ✨

okay bestie, this one lives in libmongoc (that's the C driver for MongoDB, iykyk) and it's called mongoc_client_get_max_bson_size. Yes the function name is the same as the page name, that's just how these things are, don't @ me. 🫢


🌸 NAME 🌸

mongoc_client_get_max_bson_size - mongoc_client_get_max_bson_size()


✨ SYNOPSIS ✨

int32_t
mongoc_client_get_max_bson_size (mongoc_client_t *client);

So like… mongoc_client_get_max_bson_size() returns the maximum bson document size allowed by the cluster. πŸ¦‹

And here's the tea: until a connection has been made, this will be the default of 16Mb. So before you've actually talked to anybody, it's just giving default energy. πŸ’€


🚫 DEPRECATED 🚫

WARNING: ⚠️ This function is deprecated and should not be used in new code.

Like, it still exists, it still works, but it's giving "we're not mad we're just disappointed." Don't build anything new on it, periodt. πŸ™ˆ


πŸŽ€ PARAMETERS πŸŽ€

  • client: A mongoc_client_t.

That's it. One (1) parameter. She's low maintenance. πŸ‘‘


πŸ’– RETURNS πŸ’–

The server provided max bson size, or 16Mb if no connection has been established. πŸ“


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2017-present, MongoDB, Inc


okay that's the whole page, you ate it, I'm obsessed, go forth and check your bson sizes responsibly πŸ’œβœ¨

libmongoc, version 1.23.1 πŸŽ€ Apr 27, 202M β€” yeah bestie that date is exactly what it says on the tin, don't ask me, the manpage said it first πŸ˜­πŸ’…

πŸ“¦ where this page comes from