bson_iter_codewscope man page

bson_iter_codewscope ā€” bson_iter_codewscope()

Synopsis

#define BSON_ITER_HOLDS_CODEWSCOPE(iter) \
   (bson_iter_type ((iter)) == BSON_TYPE_CODEWSCOPE)

const char *
bson_iter_codewscope (const bson_iter_t *iter,
                      uint32_t *length,
                      uint32_t *scope_len,
                      const uint8_t **scope);

Parameters

Description

The bson_iter_codewscope() function acts similar to bson_iter_code() except for BSON_TYPE_CODEWSCOPE elements. It also will provide a pointer to the buffer for scope, which can be loaded into a bson_t using bson_init_static().

Returns

An UTF-8 encoded string containing the JavaScript code which should not be modified or freed.

Author

MongoDB, Inc

Info

Nov 02, 2017 1.8.1 Libbson