1BSON_APPEND_TIMESTAMP(3)            libbson           BSON_APPEND_TIMESTAMP(3)
2
3
4

SYNOPSIS

6          #define BSON_APPEND_TIMESTAMP(b, key, val, inc) \
7             bson_append_timestamp (b, key, (int) strlen (key), val, inc)
8
9          bool
10          bson_append_timestamp (bson_t *bson,
11                                 const char *key,
12                                 int key_length,
13                                 uint32_t timestamp,
14                                 uint32_t increment);
15

PARAMETERS

17bson: A bson_t.
18
19key: An ASCII C string containing the name of the field.
20
21key_length: The length of key in bytes, or -1 to determine the length
22         with strlen().
23
24timestamp: A uint32_t.
25
26increment: A uint32_t.
27

DESCRIPTION

29       This    function    is    not    similar    in     functionality     to
30       bson_append_date_time().  Timestamp elements are different in that they
31       include only second precision and an increment field.
32
33       They are primarily used for intra-MongoDB server communication.
34
35       The bson_append_timestamp() function shall append a new element of type
36       BSON_TYPE_TIMESTAMP.
37

RETURNS

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

AUTHOR

43       MongoDB, Inc
44
46       2017-present, MongoDB, Inc
47
48
49
50
511.25.1                           Nov 08, 2023         BSON_APPEND_TIMESTAMP(3)
Impressum