Not quite sure what to call it, but in SQL, I often find myself doing something like this during development:
DELETE FROM people WHERE name == "John"
This is often used when I just imported a bunch of data with a batch importer and want to delete some results, but not the entire data set. How do I do this in CouchDB? I can easily make a display function
function(doc) {
if (doc.Name == "John")
emit(doc._id, null);
}
And then delete the returned _ids ... but it will require me to write some kind of external application to take these _ids and execute DELETE. Sometimes my queries are much more complicated and will require a few queries, followed by deletion, and then another query and update.
What is the accepted method of doing this kind of card / delete and possibly a card / update?
source
share