Skip to content

Instantly share code, notes, and snippets.

@gr2m
Created October 29, 2011 16:24
Show Gist options
  • Save gr2m/1324729 to your computer and use it in GitHub Desktop.
Save gr2m/1324729 to your computer and use it in GitHub Desktop.
couchDB: delete multiple DBs at once using jquery.couch.js
// this works perfectly within Futon
regex_str = prompt('Databases that match the following pattern will be deleted ("*" for all)')
$.couch.allDbs({success:function(dbs){
dbs.forEach( function(db) {
if (RegExp(regex_str).test(db)) {
$.couch.db(db).drop()
}
})
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment