BSON_ITER_OVERWRITE_OID(3)
β¨ BSON_ITER_OVERWRITE_OID β¨
okay bestie, welcome to bson_iter_overwrite_oid β a libbson function and honestly? it does exactly one thing and it does it slay π
πΈ SYNOPSIS πΈ
void
bson_iter_overwrite_oid (bson_iter_t *iter, const bson_oid_t *value);
that's it, that's the whole signature π
π¦ PARAMETERS π¦
iterβ Abson_iter_t. your iterator, your main character, the vibe you're working with β¨oidβ Abson_oid_t. yep, that's literally what the manpage says in the parameter list π«Ά
π DESCRIPTION π
so like. bson_iter_overwrite_oid() shall overwrite the contents of a BSON_TYPE_OID element in place π₯ no new document, no copy, just β poof β swapped right where it sits, periodt.
β οΈ heads up bestie: this may only be done when the underlying bson document allows mutation. if it doesn't, that's not a "haha oops" situation, that's a whole problem. π
and the one that'll get you if you're not paying attention: it is a programming error to call this function when iter is not observing an element of type BSON_TYPE_OID. not a warning, not a returned error code, a programming error. iykyk π check your type first, fr fr.
π AUTHOR π
MongoDB, Inc π«Ά iconic of them honestly.
π COPYRIGHT π
2009-present, MongoDB, Inc. β slay, long-running, established, we love to see it β
aaand that's the whole page, bestie π§ mwah π this was libbson version 2.5.6, dated Oct 09, 2026 β go forth and overwrite responsibly ππ
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms