bson_append_array_begin man page

bson_append_array_begin() — The bson_append_array_begin() function shall begin appending an array field to bson. This allows for incrementally building a sub-array. Doing so will generally yield better performance as you will serialize to a single buffer. When done building the sub-array, the caller MUST call bson_append_array_end().

Synopsis

bool
bson_append_array_begin (bson_t     *bson,
                         const char *key,
                         int         key_length,
                         bson_t     *child);

Parameters

bson
A bson_t
key
A string containing the name for the key.
key_length
The length of key or ‐1 to call strlen(3)
child
A bson_t

Description

The bson_append_array_begin(3) function shall begin appending an array field to bson MUST call bson_append_array_end(3)

Returns

true if the operation was applied successfully, otherwise false and bson should be discarded.

Colophon

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.

Referenced By

bson_append_array_end(3), bson_creating(3), bson_destroy_with_steal(3).

2016‐10‐28 libbson