BSON_APPEND_NULL(3)

okay so this is the BSON_APPEND_NULL(3) page from libbson, and it's giving β€œappend a null element” realness πŸ’– let's get into it, bestie.

✨ SYNOPSIS ✨

like literally, here's the exact synopsis:

#define BSON_APPEND_NULL(b, key) bson_append_null (b, key, (int) strlen (key))

bool
bson_append_null (bson_t *bson, const char *key, int key_length);

πŸŽ€ PARAMETERS πŸŽ€

  • bson β€” A bson_t. the doc you're blessing with a new field.
  • key β€” An ASCII C string containing the name of the field.
  • key_length β€” The length of key in bytes, or -1 to determine the length with strlen().

πŸ¦‹ DESCRIPTION πŸ¦‹

The bson_append_null() function shall append a new element to bson of type BSON_TYPE_NULL. that's it, that's the whole serve πŸ’…

🌸 RETURNS 🌸

Returns true if the operation was applied successfully. The function will fail if appending the value grows bson larger than INT32_MAX. so if your BSON grows past INT32_MAX, it's a no-go, bestie 😭

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


cute sign-off time 🫢 this BSON_APPEND_NULL(3) page is from libbson version 2.5.6, dated Oct 09, 2026. go forth and append nulls, icon πŸ’–βœ¨

πŸ“¦ where this page comes from