Converts a bson_value_t to another type. If BSON is used as a type, it assumes it's a document. Make sure to unlock() that BSON.
Fills a BSON with the members from a struct. if ignoreDefaults is true, then values with the default value aren't added. this behavior is useful to toggle it on insertions but off for option or query parameters.
Creates a BSON from a JSON string. The BSON needs to be destroyed manually with unlock()
ignoreDefaults does nothing, is just for compatibility with the other toBSON.
Converts a POD struct to a BSON object.
Converts a string to an object id.
Empty if constructed with null.
Used for iterating mongoc_cursor_ts as input ranges.
Used just for 'as' function.
Wrapper over mongoc_client_pool_t that allows getting a client with lock(). After usage this should be freed with unlock(). Note that this.unlock isn't the reverse operation of this.lock. Clients should use their unlock().
A BSON that is destroyed if created from a struct on its destructor and just a wrapper over an existing BSON otherwise.