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

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

DESCRIPTION

32       This    function    is    not    similar    in     functionality     to
33       bson_append_date_time().  Timestamp elements are different in that they
34       include 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.14.0                           Feb 22, 2019         BSON_APPEND_TIMESTAMP(3)
Impressum