Created
October 29, 2011 16:24
-
-
Save gr2m/1324729 to your computer and use it in GitHub Desktop.
couchDB: delete multiple DBs at once using jquery.couch.js
This file contains hidden or 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
// 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