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.
Checks whether the instance of 'Type' has the default value on 'field' if it does and isn't marked with the MongoKeep UDA does nothing, else appends that field to the BSON. In case the field is a struct or array, it checks recursively.
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.
Returns the _id field of a bson_t, it must have it and be of type OID.
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.