Skip to content

Instantly share code, notes, and snippets.

@mikeymckay
Created January 21, 2014 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeymckay/8547600 to your computer and use it in GitHub Desktop.
Save mikeymckay/8547600 to your computer and use it in GitHub Desktop.
How to remove all documents found by a couchdb view
$.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