BSON_ARRAY_BUI...D_BIT_ELEMENTS(3)

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

okay so this is BSON_ARRAY_BUI...D_BIT_ELEMENTS(3) from the libbson manual, and it's literally here to make packed-bit vector data slide into a plain BSON Array. no cap, it's giving useful πŸ’–

✨ SYNOPSIS ✨

          bool
          bson_array_builder_append_vector_packed_bit_elements (bson_array_builder_t *builder,
                                                                bson_vector_packed_bit_const_view_t view);

πŸŽ€ PARAMETERS πŸŽ€

  • builder: a valid bson_array_builder_t. bestie, it has to be valid, okay?
  • view: a bson_vector_packed_bit_const_view_t pointing to validated packed_bit BSON Binary Vector subtype data. yes, every one of those words matters πŸ’…

🌸 DESCRIPTION 🌸

This function converts the Vector pointed to by view into elements of a plain BSON Array, and writes them to builder. every single element will be 0 or 1, written as a BSON_TYPE_INT32. like, that's the whole assignment, and it ate.

πŸ¦‹ RETURNS πŸ¦‹

It returns true if the operation was applied successfully. the function fails if appending the array grows bson larger than INT32_MAX. watch that size, bestie 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • bson_append_array_from_vector()
  • bson_array_builder_append_vector_elements()

πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc

2009-present, MongoDB, Inc.

xoxo, your Unix bestie πŸ’…βœ¨ β€” this cutie is from libbson version 2.5.6, with the footer date chunk showing Oct 09, 202 before the title crashed into it, iconic πŸŽ€

πŸ“¦ where this page comes from