Wrapper for mongoc_collection_rename().

This function is a helper to rename an existing collection on a MongoDB server. The name of the collection will also be updated internally so it is safe to continue using this collection after the rename. Additional operations will occur on renamed collection.

Property definitions

mongodb $ NativeMongoCollection :: rename
	# Wrapper for `mongoc_collection_rename()`.
	#
	# This function is a helper to rename an existing collection on a MongoDB server.
	# The name of the collection will also be updated internally so it is safe
	# to continue using this collection after the rename.
	# Additional operations will occur on renamed collection.
	fun rename(new_database, new_name: CString): Bool `{
		bson_error_t error;
		if(!mongoc_collection_rename(self, new_database, new_name, false, &error)){
			NativeMongoCollection_set_mongoc_error(self, &error);
			return false;
		}
		return true;
	`}
lib/mongodb/native_mongodb.nit:491,2--504,3