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

NAME

6       bson_append_timestamp - bson_append_timestamp()
7

SYNOPSIS

9          #define BSON_APPEND_TIMESTAMP(b, key, val, inc) \
10             bson_append_timestamp (b, key, (int) strlen (key), val, inc)
11
12          bool
13          bson_append_timestamp (bson_t *bson,
14                                 const char *key,
15                                 int key_length,
16                                 uint32_t timestamp,
17                                 uint32_t increment);
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
27timestamp: A uint32_t.
28
29increment: A uint32_t.
30

DESCRIPTION

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

RETURNS

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

AUTHOR

46       MongoDB, Inc
47
49       2017-present, MongoDB, Inc
50
51
52
53
541.20.0                           Nov 18, 2021         BSON_APPEND_TIMESTAMP(3)
Impressum