deleteCollection()
Deletes a collection, including all items and indexes
Example
db.deleteCollection("users").then(() => {
console.log("deleteCollection:", "ok");
}).catch((error) => {
console.log("error:", error);
});
deleteCollection(name)
Parameter
Description
name
String The name for the collection
Last updated
Was this helpful?