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

19       · bson: A bson_t.
20
21       · key: A string containing the name for the key.
22
23       · key_length: The length of key or -1 to call strlen().
24
25       · child: 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.
30       Doing  so will generally yield better performance as you will serialize
31       to a single buffer. When done building the sub-array, the  caller  MUST
32       call 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.17.4                           Feb 04, 2021       BSON_APPEND_ARRAY_BEGIN(3)
Impressum