1BSON_APPEND_BINARY(3)               libbson              BSON_APPEND_BINARY(3)
2
3
4

SYNOPSIS

6          #define BSON_APPEND_BINARY(b, key, subtype, val, len) \
7             bson_append_binary (b, key, (int) strlen (key), subtype, val, len)
8
9          bool
10          bson_append_binary (bson_t *bson,
11                              const char *key,
12                              int key_length,
13                              bson_subtype_t subtype,
14                              const uint8_t *binary,
15                              uint32_t length);
16

PARAMETERS

18bson: A bson_t.
19
20key: The key name.
21
22key_length: The length of key in bytes or -1 to use strlen().
23
24subtype: A bson_subtype_t indicating the binary subtype.
25
26binary:  A  buffer  to embed as binary data. May be NULL for an empty
27         binary value.
28
29length: The length of buffer in bytes. Must be 0 if binary is NULL.
30

DESCRIPTION

32       The bson_append_binary() function shall append a new  element  to  bson
33       containing the binary data provided.
34

RETURNS

36       Returns  true  if  the operation was applied successfully. The function
37       will fail if appending binary grows bson larger than INT32_MAX.
38

AUTHOR

40       MongoDB, Inc
41
43       2017-present, MongoDB, Inc
44
45
46
47
481.25.1                           Nov 08, 2023            BSON_APPEND_BINARY(3)
Impressum