dropCollection method
Implementation
Future<bool> dropCollection(String collectionName) async {
if (masterConnection.serverCapabilities.supportsOpMsg) {
var result = await modernDrop(collectionName);
return result[keyOk] == 1.0;
}
var collectionInfos = await getCollectionInfos({'name': collectionName});
if (collectionInfos.length == 1) {
return executeDbCommand(
DbCommand.createDropCollectionCommand(this, collectionName))
.then((_) => true);
}
return true;
}