BSON_ARRAY_BUI...LOAT32_ELEMENTS(3)

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

πŸ’– 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 valid bson_array_builder_t. Like, it has to be valid, bestieβ€”no fake builder energy.
  • view β€” a bson_vector_float32_const_view_t pointing 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. πŸ‘‘

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