Wrapper for mongoc_collection_remove(MONGOC_REMOVE_SINGLE_REMOVE).

This function shall remove the first document in the collection that matches selector. The bson selector is not validated, simply passed along as appropriate to the server.

Property definitions

mongodb $ NativeMongoCollection :: remove
	# Wrapper for `mongoc_collection_remove(MONGOC_REMOVE_SINGLE_REMOVE)`.
	#
	# This function shall remove the first document in the collection that matches
	# `selector`.
	# The bson selector is not validated, simply passed along as appropriate to the server.
	fun remove(selector: NativeBSON): Bool import set_mongoc_error `{
		bson_error_t error;
		if(!mongoc_collection_remove(self, MONGOC_REMOVE_SINGLE_REMOVE, selector, NULL, &error)) {
			NativeMongoCollection_set_mongoc_error(self, &error);
			return false;
		}
		return true;
	`}
lib/mongodb/native_mongodb.nit:363,2--375,3