1BSON_APPEND_CODE(3)                 libbson                BSON_APPEND_CODE(3)
2
3
4

SYNOPSIS

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

PARAMETERS

16bson: A bson_t.
17
18key: The key name.
19
20key_length: The length of key or -1 to use strlen().
21
22javascript: A UTF-8 encoded string containing the javascript.
23

DESCRIPTION

25       The  bson_append_code() function shall append a new element to bson us‐
26       ing the UTF-8 encoded javascript provided. javascript must  be  a  NULL
27       terminated C string.
28

RETURNS

30       Returns  true  if  the operation was applied successfully. The function
31       will fail if appending javascript grows bson larger than INT32_MAX.
32

AUTHOR

34       MongoDB, Inc
35
37       2017-present, MongoDB, Inc
38
39
40
41
421.25.1                           Nov 08, 2023              BSON_APPEND_CODE(3)
Impressum