Created
January 21, 2014 20:20
-
-
Save mikeymckay/8547600 to your computer and use it in GitHub Desktop.
How to remove all documents found by a couchdb view
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
$.couch.db("tangerine").view "tangerine/results", | |
include_docs: true | |
success: (result) -> | |
docs = for row in result.rows | |
row.doc | |
$.couch.db("tangerine").bulkRemove {docs: docs}, | |
success: (result) -> | |
console.log result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment