Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to drop collection in mongoose

mongoose.connection.db.dropCollection('collection', function(err, result) {
    if (err) { console.log(err) }
    if (result) { console.log(result) }
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #drop #collection #mongoose
ADD COMMENT
Topic
Name
5+4 =