BSON_APPEND_VE..._FLOAT32_UNINIT(3)
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β abson_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 ofkeyin bytes, or-1to determine the length withstrlen(). The-1is the "let her figure it out" option.element_countβ number of elements to allocate space for. So many float32s.view_outβ receives abson_vector_float32_view_twith 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
π COPYRIGHT π
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
- 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