BSON_ITER_BINARY_EQUAL(3)

πŸ“¦
version 2.5.6 Β· 3 versions
, in epel 10

πŸ’… BSON_ITER_BINARY_EQUAL πŸ’…

okay so bestie, welcome to BSON_ITER_BINARY_EQUAL(3) from the libbson manual β€” yes that libbson, the one you keep forgetting to read the docs for 🫢. this one's short and sweet and honestly kinda iconic, so let's get into it.


✨ SYNOPSIS ✨

bool
bson_iter_binary_equal (const bson_iter_t *iter_a, const bson_iter_t *iter_b);

that's the whole signature, no cap. two iterators go in, one bool comes out 🌸


πŸŽ€ PARAMETERS πŸŽ€

  • iter_a β€” A bson_iter_t. just, like, one of them. the first one πŸ’–
  • iter_b β€” A bson_iter_t. and the other one. the second one. the comparison partner, the main character to iter_a's main character 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

Compare two BSON_TYPE_BINARY fields for exact equality. like, exact exact. no vibes-based approximations here, we're doing a real comparison πŸ’…

and here's the tea: this is the preferred way to compare BSON Binary Vector subtype values for equality. so if you were out here hand-rolling your own binary comparison for vector subtypes... bestie. no. put that down. use this one 🫢


πŸ‘‘ RETURNS πŸ‘‘

true if both iterators point to BSON_TYPE_BINARY fields with identical subtype and contents ✨

false if there is any difference in subtype, length, or content, or if the fields are not binary type. yeah β€” not-binary counts as a fail too, so don't come at this function with a string and expect a good time πŸ™ˆ

lowkey important: false is doing a lot of heavy lifting in that sentence. different subtype? false. different length? false. different content? false. literally not binary at all? also false. it's giving "no notes, just no" πŸ’€

🌈 AUTHOR 🌈

MongoDB, Inc β€” shoutout to the whole team, they ate πŸ‘‘


2009-present, MongoDB, Inc. β€” protecting the whole thing since 2009, fr fr πŸŽ€


and that's the page!! version 2.5.6, dated Oct 09, 2026, BSON_ITER_BINARY_EQUAL(3) β€” go forth and compare your binaries exactly, bestie πŸ¦‹πŸ’œπŸ“

πŸ“¦ where this page comes from