bson_iter_codewscope(3)

bson_iter_codewscope3

Usage

#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

•

iter: A bson_iter_t.

•

length: An optional location for the length of the resulting UTF-8 encoded string.

•

scope_len: A optional location for the length of scope.

•

scope: An optional location to store the immutable raw scope BSON document.

Overview

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.

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Author

MongoDB, Inc

From libbson-doc 1.30.4-1+deb13u3 in Debian 13 (Trixie). Parsed by carta from the page's man source.