1BSON_APPEND_ARRAY_BEGIN(3)          libbson         BSON_APPEND_ARRAY_BEGIN(3)
2
3
4

NAME

6       bson_append_array_begin - bson_append_array_begin()
7

SYNOPSIS

9          #define BSON_APPEND_ARRAY_BEGIN(b, key, child) \
10             bson_append_array_begin (b, key, (int) strlen (key), child)
11
12          bool
13          bson_append_array_begin (bson_t *bson,
14                                   const char *key,
15                                   int key_length,
16                                   bson_t *child);
17

PARAMETERS

19bson: A bson_t.
20
21key: A string containing the name for the key.
22
23key_length: The length of key or -1 to call strlen().
24
25child: A bson_t.
26

DESCRIPTION

28       The  bson_append_array_begin()  function shall begin appending an array
29       field to bson. This allows for incrementally building a sub-array.  Do‐
30       ing so will generally yield better performance as you will serialize to
31       a single buffer. When done building the sub-array, the caller MUST call
32       bson_append_array_end().
33
34       For generating array element keys, see bson_uint32_to_string().
35

RETURNS

37       Returns  true  if  the operation was applied successfully. The function
38       will fail if appending the array grows bson larger than INT32_MAX.
39

AUTHOR

41       MongoDB, Inc
42
44       2017-present, MongoDB, Inc
45
46
47
48
491.23.1                           Oct 20, 2022       BSON_APPEND_ARRAY_BEGIN(3)
Impressum