1BSON_APPEND_SYMBOL(3)               libbson              BSON_APPEND_SYMBOL(3)
2
3
4

NAME

6       bson_append_symbol - bson_append_symbol()
7

SYNOPSIS

9          #define BSON_APPEND_SYMBOL(b, key, val) \
10             bson_append_symbol (b, key, (int) strlen (key), val, (int) strlen (val))
11
12          bool
13          bson_append_symbol (bson_t *bson,
14                              const char *key,
15                              int key_length,
16                              const char *value,
17                              int length);
18

PARAMETERS

20bson: A bson_t.
21
22key: An ASCII C string containing the name of the field.
23
24key_length: The length of key in bytes, or -1 to determine the length
25         with strlen().
26
27value: The symbol.
28
29length: A length of symbol in bytes, or -1 to  determine  the  length
30         with strlen().
31

DESCRIPTION

33       Appends a new field to bson of type BSON_TYPE_SYMBOL. This BSON type is
34       deprecated and should not be used in new code.
35
36       Due to legacy behavior, passing NULL for value appends  a  null  value,
37       not  a  symbol  value.  To  append  a null value directly, prefer using
38       bson_append_null().
39

RETURNS

41       Returns true if the operation was applied  successfully.  The  function
42       will fail if appending the value grows bson larger than INT32_MAX.
43

AUTHOR

45       MongoDB, Inc
46
48       2017-present, MongoDB, Inc
49
50
51
52
531.17.6                           Jun 03, 2021            BSON_APPEND_SYMBOL(3)
Impressum