BSON_ARRAY_BUI...LOAT32_ELEMENTS(3)
π BSON_ARRAY_BUI...LOAT32_ELEMENTS(3) β libbson manual page, bestie β¨
Okay so you're in the libbson manual, and this is the page for BSON_ARRAY_BUI...LOAT32_ELEMENTS(3). The name is doing the absolute most, but the function is a handy little converter: it takes a float32 BSON Binary Vector view and appends its elements into a plain BSON Array. Slay. π
β¨ SYNOPSIS β¨
bool
bson_array_builder_append_vector_float32_elements (bson_array_builder_t *builder,
bson_vector_float32_const_view_t view);
π οΈ PARAMETERS π οΈ
builderβ a validbson_array_builder_t. Like, it has to be valid, bestieβno fake builder energy.viewβ abson_vector_float32_const_view_tpointing to validated float32 BSON Binary Vector subtype data. It's the const view of the vector, and it's already validated. Periodt.
π« DESCRIPTION π«
So this function takes the Vector pointed to by view and converts it into elements of a plain BSON Array, writing all of that into builder. Every single element gets converted from float to double precisionβit's giving a lil precision glow-up. No cap. π
π«Ά RETURNS π«Ά
It returns true if the operation was applied successfully. The function fails if appending the array grows bson larger than INT32_MAX. That's the line, okay? Don't shoot the messenger. π
π SEE ALSO π
bson_append_array_from_vector()bson_array_builder_append_vector_elements()
π AUTHOR π
MongoDB, Inc. Respect the icon. π
Β©οΈ COPYRIGHT Β©οΈ
2009-present, MongoDB, Inc.
Alright bestie, cute sign-off time: this page is from libbson version 2.5.6, and the source footer has a date starting Oct 09, 20 before it runs straight into the page titleβso we're preserving that chaotic footer energy. Byeee! πβ¨ππ¦
π¦ 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