BSON_ITER_DECIMAL128(3)
π BSON_ITER_DECIMAL128(3) π
okay so bestie, welcome to the libbson corner of the manual β section 3, we're deep in library-function territory, and this one is genuinely a little icon. sit down, grab a strawberry π, and let's get into it.
β¨ SYNOPSIS β¨
here's the whole vibe, verbatim, no cap:
#define BSON_ITER_HOLDS_DECIMAL128(iter) \
(bson_iter_type ((iter)) == BSON_TYPE_DECIMAL128)
bool
bson_iter_decimal128 (const bson_iter_t *iter, /* IN */
bson_decimal128_t *dec); /* OUT */
so you've got a macro that does your vibe check for you (BSON_ITER_HOLDS_DECIMAL128 β literally just compares bson_iter_type against BSON_TYPE_DECIMAL128), and then the actual function bson_iter_decimal128 which takes your iterator and an out-param. icon behavior. π«Ά
π PARAMETERS π
iterβ abson_iter_t. your iterator. the main character of this whole operation, honestly. πdecβ a location for abson_decimal128_t. this is where the value lands once the function does its thing. think of it as the little velvet cushion the decimal gets placed on. β¨
π¦ DESCRIPTION π¦
okay so what does it actually do? it fetches the value out of a BSON_TYPE_DECIMAL128 field. periodt. that's the whole job. π
but listen β you should verify that this is a BSON_TYPE_DECIMAL128 field before calling this function. don't just roll up assuming. do the vibe check first. fr fr, no cap, this is the one thing you actually need to remember here. π
π₯ RETURNS π₯
trueβ if type wasBSON_TYPE_DECIMAL128. slay, it worked, you ate. πfalseβ otherwise. not today bestie. π
πΈ AUTHOR πΈ
MongoDB, Inc β the legends themselves. π
π COPYRIGHT π
2009-present, MongoDB, Inc. β like, they've been holding it down since 2009 and they're still here. iconic longevity. β
aaaand that's the whole page, bestie!! π§π
cute little sign-off to close it out: this was libbson version 2.5.6, dated Oct 09, 2026, page BSON_ITER_DECIMAL128(3) β so if you're reading this from the future, hi, you're exactly on time. see you in the next manpage, mwah ππ¦
π¦ 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