BSON_APPEND_VE..._FLOAT32_UNINIT(3)

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

BSON_APPEND_VE..._FLOAT32_UNINIT(3) πŸ’…

okay so this is the libbson manual page for BSON_APPEND_VE..._FLOAT32_UNINIT(3) β€” yes, the name is a whole mouthful, but she's iconic. Buckle up, bestie, we're appending an uninitialized float32 vector and it's gonna slay. ✨


✨ SYNOPSIS ✨

Here's the exact synopsis, character-for-character, no cap:

#define BSON_APPEND_VECTOR_FLOAT32_UNINIT(b, key, count, view) \
   bson_append_vector_float32_uninit (b, key, (int) strlen (key), count, view)

bool
bson_append_vector_float32_uninit (bson_t *bson,
                                   const char *key,
                                   int key_length,
                                   size_t element_count,
                                   bson_vector_float32_view_t *view_out);

πŸŽ€ PARAMETERS πŸŽ€

  • bson β€” a bson_t. That's the document you're touching. Main character energy.
  • key β€” an ASCII C string containing the name of the field. ASCII only, bestie.
  • key_length β€” the length of key in bytes, or -1 to determine the length with strlen(). The -1 is the "let her figure it out" option.
  • element_count β€” number of elements to allocate space for. So many float32s.
  • view_out β€” receives a bson_vector_float32_view_t with uninitialized elements. Handle with care, she's not filled in yet.

πŸ¦‹ DESCRIPTION πŸ¦‹

Appends a new field to bson by allocating a Vector with the indicated number of float32 elements. The elements will be uninitialized β€” like, blank, no vibes inside yet.

On success, the caller β€” that's you β€” must write every element in the Vector if the resulting bson_t is to be used. No skipping, periodt.

The view written to *view_out is only valid until bson is otherwise modified or freed. So use it before you poke the bson again, okay? 😭


πŸ”₯ RETURNS πŸ”₯

Returns true if the operation was applied successfully. The function fails if appending the array grows bson larger than INT32_MAX. That's the limit, bestie β€” respect it. πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


xoxo, bestie 🫢 β€” source/version: libbson 2.5.6, date: Oct 09, 20 (the footer date got cut off by the header, it's giving typo-core πŸ˜­πŸ’€).

πŸ“¦ where this page comes from