1BSON_APPEND_ARRAY(3)                libbson               BSON_APPEND_ARRAY(3)
2
3
4

SYNOPSIS

6          #define BSON_APPEND_ARRAY(b, key, val) \
7             bson_append_array (b, key, (int) strlen (key), val)
8
9          bool
10          bson_append_array (bson_t *bson,
11                             const char *key,
12                             int key_length,
13                             const bson_t *array);
14

PARAMETERS

16bson: A bson_t.
17
18key: An ASCII C string containing the name of the field.
19
20key_length: The length of key in bytes, or -1 to determine the length
21         with strlen().
22
23array: A bson_t.
24

DESCRIPTION

26       The bson_append_array() function shall append array to bson  using  the
27       specified  key.  The  type of the field will be an array, but it is the
28       responsibility of the caller to ensure that the keys of array are prop‐
29       erly formatted with string keys such as "0", "1", "2" and so forth.
30

RETURNS

32       Returns  true  if  the operation was applied successfully. The function
33       fails if appending the array grows bson larger than INT32_MAX.
34
35       SEE ALSO:
36          bson_array_builder_t
37
38

AUTHOR

40       MongoDB, Inc
41
43       2017-present, MongoDB, Inc
44
45
46
47
481.25.1                           Nov 08, 2023             BSON_APPEND_ARRAY(3)
Impressum