BSON_APPEND_DOUBLE(3)
hey bestie π welcome to the BSON_APPEND_DOUBLE(3) page, aka the libbson moment where we append a double to a BSON document and move on with our lives. this page covers both the macro bestie BSON_APPEND_DOUBLE() and the function bson_append_double(), and honestly? it's giving "tiny API, big slay" β¨
β¨ SYNOPSIS β¨
#define BSON_APPEND_DOUBLE(b, key, val) \
bson_append_double (b, key, (int) strlen (key), val)
bool
bson_append_double (bson_t *bson,
const char *key,
int key_length,
double value);
π PARAMETERS π
bsonβ abson_t. that's the document bestie we're adding to πkeyβ an ASCII C string containing the name of the field. it's the little label for your element π·οΈkey_lengthβ the length ofkeyin bytes, or-1to determine the length withstrlen(). yes,-1is the "bestie, you figure it out" option πvalueβ adoublevalue to append. the actual number going in π₯
πΈ DESCRIPTION πΈ
the bson_append_double() function shall append a new element to a bson document of type double. that's the vibe: new element, type double, done β¨
π₯ RETURNS π₯
returns true if the operation was applied successfully β slay β
. the function will fail if appending value grows bson larger than INT32_MAX β that's the limit, and crossing it means failure, no cap π.
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
that's the whole page bestie π«Ά it's from libbson version 2.5.6, dated Oct 09, 2026 β go forth and append those doubles, periodt π
β¨
π¦ 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