MongoCollection collection = resolveCollection(collectionName, false);
int n;
if (collection == null) {
n = 0;
} else {
n = collection.deleteDocuments(selector, limit);
}
final BSONObject result = new BasicBSONObject("n", Integer.valueOf(n));
putLastResult(channel, result);
return result;
} catch (MongoServerError e) {