Created
March 8, 2014 04:10
-
-
Save manobi/9425208 to your computer and use it in GitHub Desktop.
Bulk delete with cradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var docs = [ | |
{ _id: 'a82e5e9a093b197960f69dfa17005132', | |
_rev: '1-70aa8fe77bbe596bded4a9de3aa185e4' | |
}, | |
{ _id: 'a82e5e9a093b197960f69dfa1700534e', | |
_rev: '1-70aa8fe77bbe596bded4a9de3aa185e4' | |
} | |
] | |
docs = docs.map(function(doc){ | |
doc._deleted = true; | |
return doc; | |
}); | |
db.save(docs, callback); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment