How to access an deleted document

338 views
Skip to first unread message

fa...@2flub.org

unread,
Jan 2, 2010, 2:29:35 PM1/2/10
to CouchDB-Python
Hi,

I'm playing around with CouchDB (0.10) and CouchDB-Python (0.6)
and try to achieve undeleting an deleted document.

But to do that with CouchDB, you have to use the last revision ID to
access the deleted document.
And with CouchDB-Python I haven't found how to use the revision ID
when loading a document.

Is it not possible or did I miss something in the documentation?

Matt Goodall

unread,
Jan 2, 2010, 3:14:28 PM1/2/10
to couchdb...@googlegroups.com

Hi,

I'm playing around with CouchDB (0.10) and CouchDB-Python (0.6)
and try to achieve undeleting an deleted document.

But to do that with CouchDB, you have to use the last revision ID to
access the deleted document.
And with CouchDB-Python I haven't found how to use the revision ID
when loading a document.

doc = db.get(docid, rev=deleted_rev)
 

Is it not possible or did I miss something in the documentation?


The couchdb-python API often passes any additional keyword args straight through as GET (or POST) args. So, if there's an arg available in the HTTP API then it's almost certainly available as a keyword arg in the python API too.

- Matt

fa...@2flub.org

unread,
Jan 2, 2010, 4:09:28 PM1/2/10
to CouchDB-Python
Great. It works now. Thank you very much

On Jan 2, 9:14 pm, Matt Goodall <matt.good...@gmail.com> wrote:
> doc = db.get(docid, rev=deleted_rev)

Reply all
Reply to author
Forward
0 new messages