bson_array_builder_append_vector_elements

Synopsis

bool
bson_array_builder_append_vector_elements (bson_array_builder_t *builder,
                                           const bson_iter_t *iter);

Parameters

Description

Converts the Vector pointed to by iter into elements of a plain BSON Array, written to builder. This conversion is polymorphic: A converted element type will be chosen based on the type of the input Vector. For details, see the type-specific versions of this function.

Returns

Returns true if the operation was applied successfully. The function fails if appending the array grows bson larger than INT32_MAX, or if iter doesn't point to a valid recognized Vector type.

See also:

bson_append_array_from_vector() <>
bson_array_builder_append_vector_int8_elements() <>
bson_array_builder_append_vector_float32_elements() <>
bson_array_builder_append_vector_packed_bit_elements() <>

Author

MongoDB, Inc

Info

Mar 04, 2026 2.2.3 libbson