1BSON_ITER_CODEWSCOPE(3) libbson BSON_ITER_CODEWSCOPE(3)
2
3
4
6 bson_iter_codewscope - bson_iter_codewscope()
7
9 #define BSON_ITER_HOLDS_CODEWSCOPE(iter) \
10 (bson_iter_type ((iter)) == BSON_TYPE_CODEWSCOPE)
11
12 const char *
13 bson_iter_codewscope (const bson_iter_t *iter,
14 uint32_t *length,
15 uint32_t *scope_len,
16 const uint8_t **scope);
17
19 • iter: A bson_iter_t.
20
21 • length: An optional location for the length of the resulting UTF-8
22 encoded string.
23
24 • scope_len: A optional location for the length of scope.
25
26 • scope: An optional location to store the immutable raw scope BSON
27 document.
28
30 The bson_iter_codewscope() function acts similar to bson_iter_code()
31 except for BSON_TYPE_CODEWSCOPE elements. It also will provide a
32 pointer to the buffer for scope, which can be loaded into a bson_t us‐
33 ing bson_init_static().
34
36 An UTF-8 encoded string containing the JavaScript code which should not
37 be modified or freed.
38
40 MongoDB, Inc
41
43 2017-present, MongoDB, Inc
44
45
46
47
481.23.1 Oct 20, 2022 BSON_ITER_CODEWSCOPE(3)