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

NAME

6       bson_append_binary - bson_append_binary()
7

SYNOPSIS

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

PARAMETERS

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

DESCRIPTION

35       The bson_append_binary() function shall append a new  element  to  bson
36       containing the binary data provided.
37

RETURNS

39       Returns  true  if  the operation was applied successfully. The function
40       will fail if appending binary grows bson larger than INT32_MAX.
41

AUTHOR

43       MongoDB, Inc
44
46       2017-present, MongoDB, Inc
47
48
49
50
511.24.3                           Aug 17, 2023            BSON_APPEND_BINARY(3)
Impressum