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)

Last updated