1BSON_APPEND_DOCUMENT(3)             libbson            BSON_APPEND_DOCUMENT(3)
2
3
4

SYNOPSIS

6          #define BSON_APPEND_DOCUMENT(b, key, val) \
7             bson_append_document (b, key, (int) strlen (key), val)
8
9          bool
10          bson_append_document (bson_t *bson,
11                                const char *key,
12                                int key_length,
13                                const bson_t *value);
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
23value: A bson_t containing the sub-document to append.
24

DESCRIPTION

26       The bson_append_document() function shall append child  to  bson  using
27       the specified key. The type of the field will be a document.
28

RETURNS

30       Returns  true  if  the operation was applied successfully. The function
31       will fail if appending value 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_DOCUMENT(3)
Impressum