lanto03 / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

Patch for include_docs=True #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I added support for include_docs=true by changing the Rows class to
subclass dict and use properties for accessing id/key/value/doc.

Fairly self explanatory.

Original issue reported on code.google.com by paul.jos...@gmail.com on 5 Nov 2008 at 8:45

Attachments:

GoogleCodeExporter commented 8 years ago
FWIW, I like this approach better than the one I took in #32.  Subclassing dict 
makes a lot of sense here.

It hit me after looking at this that Row.doc should probably be a Document 
rather than a dict.

Original comment by jpwa...@gmail.com on 5 Nov 2008 at 9:17

GoogleCodeExporter commented 8 years ago
Touche. Updated the patch to return a Document if the object evaluates to true.

Original comment by paul.jos...@gmail.com on 5 Nov 2008 at 9:38

Attachments:

GoogleCodeExporter commented 8 years ago
Patch was applied in r122. Thanks!

Original comment by cmlenz on 26 Nov 2008 at 8:44