1BSON_APPEND_VALUE(3)                Libbson               BSON_APPEND_VALUE(3)
2
3
4

NAME

6       bson_append_value - bson_append_value()
7

SYNOPSIS

9          #define BSON_APPEND_VALUE(b, key, val) \
10             bson_append_value (b, key, (int) strlen (key), (val))
11
12          bool
13          bson_append_value (bson_t *bson,
14                             const char *key,
15                             int key_length,
16                             const bson_value_t *value);
17

PARAMETERS

19       · bson: A bson_t.
20
21       · key: An ASCII C string containing the name of the field.
22
23       · key_length: The length of key in bytes, or -1 to determine the length
24         with strlen().
25
26       · value: A bson_value_t.
27

DESCRIPTION

29       Appends a new field to bson by determining the  boxed  type  in  value.
30       This  is useful if you want to copy fields between documents but do not
31       know the field type until runtime.
32

RETURNS

34       Returns true if the operation was applied  successfully.  The  function
35       will fail if appending the value grows bson larger than INT32_MAX.
36

AUTHOR

38       MongoDB, Inc
39
41       2017-present, MongoDB, Inc
42
43
44
45
461.15.2                           Nov 06, 2019             BSON_APPEND_VALUE(3)
Impressum