1BSON_ITER_AS_BOOL(3)                libbson               BSON_ITER_AS_BOOL(3)
2
3
4

NAME

6       bson_iter_as_bool - bson_iter_as_bool()
7

SYNOPSIS

9          bool
10          bson_iter_as_bool (const bson_iter_t *iter);
11

PARAMETERS

13       · iter: A bson_iter_t.
14

DESCRIPTION

16       Fetches the current field as if it were a boolean.
17
18       bson_iter_as_bool()  currently  knows  how to determine a boolean value
19       from the following types:
20
21       · BSON_TYPE_BOOL
22
23       · BSON_TYPE_DOUBLE
24
25       · BSON_TYPE_INT32
26
27       · BSON_TYPE_INT64
28
29       · BSON_TYPE_NULL
30
31       · BSON_TYPE_UNDEFINED
32
33       · BSON_TYPE_UTF8
34
35       BSON_TYPE_UTF8 will always equate to true.
36

RETURNS

38       true if the field equates to non-zero.
39

AUTHOR

41       MongoDB, Inc
42
44       2017-present, MongoDB, Inc
45
46
47
48
491.17.4                           Feb 04, 2021             BSON_ITER_AS_BOOL(3)
Impressum