Remove dependency on raw mongo from SchemaRouter.delete.

This commit is contained in:
Nikita Lutsenko
2016-02-29 17:04:38 -08:00
parent d7b1184b5e
commit 028ef2a7b2
4 changed files with 50 additions and 66 deletions

View File

@@ -30,6 +30,13 @@ export class MongoStorageAdapter {
});
}
dropCollection(name: string) {
return this.connect.then(() => this.collection(name).then(collection => collection.drop()));
}
dropCollection(name: string) {
return this.collection(name).then(collection => collection.drop());
}
// Used for testing only right now.
collectionsContaining(match: string) {
return this.connect().then(() => {