DOKK / manpages / debian 11 / libbson-doc / bson_append_iter.3.en
BSON_APPEND_ITER(3) libbson BSON_APPEND_ITER(3)

bson_append_iter - bson_append_iter()

bool
bson_append_iter (bson_t *bson,

const char *key,
int key_length,
const bson_iter_t *iter);


  • bson: A bson_t.
  • key: Optional field name. If NULL, uses bson_iter_key(iter).
  • key_length: The length of key or -1 to use strlen().
  • iter: A bson_iter_t located on the position of the element to append.

Appends the value at the current position of iter to the document.

Returns true if successful; false if the operation would overflow the maximum document size or another invalid state is detected.

MongoDB, Inc

2017-present, MongoDB, Inc

June 4, 2021 1.17.6