BSON_APPEND_AR..._VECTOR_FLOAT32(3)

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

πŸ’– BSON_APPEND_AR..._VECTOR_FLOAT32(3) πŸ’–

okay bestie, welcome to the libbson manual page for BSON_APPEND_AR..._VECTOR_FLOAT32(3). yes, the name is doing the absolute most, but the function is literally here to turn a float32 BSON Binary Vector into a plain BSON Array. no cap. ✨

✨ SYNOPSIS ✨

          #define BSON_APPEND_ARRAY_FROM_VECTOR_FLOAT32(b, key, view) \
             bson_append_array_from_vector_float32 (b, key, (int) strlen (key), view)

          bool
          bson_append_array_from_vector_float32 (bson_t *bson,
                                                 const char *key,
                                                 int key_length,
                                                 bson_vector_float32_const_view_t view);

🧾 PARAMETERS 🧾

  • bson β€” a bson_t. that's the BSON doc you're writing into, bestie. 🫢
  • key β€” an ASCII C string containing the name of the field. yep, the field name. πŸ“›
  • key_length β€” the length of key in bytes, or -1 to determine the length with strlen(). use -1 when you want the function to do the strlen() moment for you. πŸ’…
  • view β€” a bson_vector_float32_const_view_t pointing to validated float32 BSON Binary Vector subtype data. it's giving already validated, we love that. πŸ¦‹

🌸 DESCRIPTION 🌸

Converts the Vector pointed to by view into a plain BSON Array, written to bson under the name key. that's it, that's the whole vibe: Vector in, regular BSON Array out, under the field name you picked. πŸŽ€

πŸ’« RETURNS πŸ’«

Returns true if the operation was applied successfully. the function fails if appending the array grows bson larger than INT32_MAX. so like, successful append = true; too big = nope. 😭

πŸ‘€ SEE ALSO πŸ‘€

  • bson_array_builder_append_vector_float32_elements()

🫢 AUTHOR 🫢

MongoDB, Inc

2009-present, MongoDB, Inc.

k bye bestie πŸ’– β€” this libbson page is version 2.5.6, dated Oct 09, 20.

πŸ“¦ where this page comes from