1BSON_APPEND_ARRAY_BEGIN(3) libbson BSON_APPEND_ARRAY_BEGIN(3)
2
3
4
6 bson_append_array_begin - bson_append_array_begin()
7
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
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
28 The bson_append_array_begin() function shall begin appending an array
29 field to bson. This allows for incrementally building a sub-array. Do‐
30 ing so will generally yield better performance as you will serialize to
31 a single buffer. When done building the sub-array, the caller MUST call
32 bson_append_array_end().
33
34 For generating array element keys, see bson_uint32_to_string().
35
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
41 MongoDB, Inc
42
44 2017-present, MongoDB, Inc
45
46
47
48
491.23.1 Oct 20, 2022 BSON_APPEND_ARRAY_BEGIN(3)