1BSON_APPEND_DOCUMENT_BEGIN(3)       libbson      BSON_APPEND_DOCUMENT_BEGIN(3)
2
3
4

SYNOPSIS

6          #define BSON_APPEND_DOCUMENT_BEGIN(b, key, child) \
7             bson_append_document_begin (b, key, (int) strlen (key), child)
8
9          bool
10          bson_append_document_begin (bson_t *bson,
11                                      const char *key,
12                                      int key_length,
13                                      bson_t *child);
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
23child: An uninitialized bson_t to be initialized as the sub-document.
24

DESCRIPTION

26       The  bson_append_document_begin()  function  shall  begin  appending  a
27       sub-document to bson. Use child to add fields to the sub-document. When
28       completed, call bson_append_document_end() to complete the element.
29
30       child MUST be an uninitialized bson_t to avoid leaking memory.
31

RETURNS

33       Returns true if the operation was applied  successfully.  The  function
34       will fail if bson must grow larger than INT32_MAX.
35

AUTHOR

37       MongoDB, Inc
38
40       2017-present, MongoDB, Inc
41
42
43
44
451.25.1                           Nov 08, 2023    BSON_APPEND_DOCUMENT_BEGIN(3)
Impressum