BSON_COMPARE(3)

πŸ’… BSON_COMPARE πŸ’…

okay bestie, this is the libbson manual page for bson_compare() β€” the equality-checking little icon with main character energy. it compares two bson documents for equality, no cap.

✨ SYNOPSIS ✨

int
bson_compare (const bson_t *bson, const bson_t *other);

πŸŽ€ PARAMETERS πŸŽ€

  • bson β€” a bson_t. literally one of the documents, bestie.
  • other β€” a bson_t. the other one. periodt.

🌸 DESCRIPTION 🌸

The bson_compare() function shall compare two bson documents for equality.

This can be useful in conjunction with qsort(). like, it's giving sorting-assist energy.

If equal, 0 is returned.

TIP: This function uses memcmp() internally, so the semantics are the same. iykyk πŸ’…

⭐ RETURNS ⭐

less than zero, zero, or greater than zero in qsort() style.

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


cute sign-off time: this page is from libbson 2.5.6, dated Oct 09, 2026. slay and bye bestie 🫢✨

πŸ“¦ where this page comes from