1BSON_APPEND_CODE(3) Libbson BSON_APPEND_CODE(3)
2
3
4
6 bson_append_code - bson_append_code()
7
9 #define BSON_APPEND_CODE(b, key, val) \
10 bson_append_code (b, key, (int) strlen (key), val)
11
12 bool
13 bson_append_code (bson_t *bson,
14 const char *key,
15 int key_length,
16 const char *javascript);
17
19 · bson: A bson_t.
20
21 · key: The key name.
22
23 · key_length: The length of key or -1 to use strlen().
24
25 · javascript: A UTF-8 encoded string containing the javascript.
26
28 The bson_append_code() function shall append a new element to bson
29 using the UTF-8 encoded javascript provided. javascript must be a NULL
30 terminated C string.
31
33 Returns true if the operation was applied successfully. The function
34 will fail if appending javascript grows bson larger than INT32_MAX.
35
37 MongoDB, Inc
38
40 2017-present, MongoDB, Inc
41
42
43
44
451.13.1 Jan 24, 2019 BSON_APPEND_CODE(3)