couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From King Huang <>
Subject Getting Deleted Document
Date Tue, 15 Jun 2010 16:07:37 GMT
Is there a way to get access to a deleted document, or be notified about a document about to
be deleted?

I have a script monitoring db changes view the _changes API, in order to react to document
changes. However, for DELETEs, there doesn't seem to be a way to get access to the just deleted
document so that I can get more information about the document that was deleted. GETting the
document with ?revs=true to try to find the previous revision returns a 404 because the document's

I've thought about using the document update validation and update handler methods to try
to maybe catch DELETE methods, set a flag on the document, and then getting the document in
my script and doing an "actual" DELETE. But, I don't see a way to do that with those functions.
Is something like that possible?

I've also tried using include_docs=True in the _changes feed, but that just returns the final
stub document for DELETEs.


King Chung Huang
Technology Solutions Analyst
Information Technologies
University of Calgary

View raw message