Scroll to navigation

BSON_APPEND_ARRAY_BEGIN(3) Library Functions Manual BSON_APPEND_ARRAY_BEGIN(3)

NAME

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.
2016‐10‐12 libbson