You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.
This is not an issue but a question. I could not find a discussion group or
a mailing list, please direct me if this isn't the appropriate forum.
I'm trying to understand how to use client.Document and schema.Document
objects in couchdb-python. For my use I don't need to map JSON documents to
python objects. However, I'm finding it cumbersome to convert responses
from the database to schema.Document objects in order to have access to
general purpose methods such as load, store and items. The similar names
also complicates keeping track of the class of an object.
If you don't need mapping to Python objects, you don't need couchdb.schema.
The load() and store() functions are just convenience functions for mapped objects. The basic functionality of
loading and storing documents is available in couchdb.client.Database class (getitem and setitem,
basically). A couchdb.client.Document is basically just a dictionary, so it provides an items() method and
everything else you find on regular Python dicts.
From kochhar...@gmail.com on December 04, 2008 02:40:37
Hello,
This is not an issue but a question. I could not find a discussion group or
a mailing list, please direct me if this isn't the appropriate forum.
I'm trying to understand how to use client.Document and schema.Document
objects in couchdb-python. For my use I don't need to map JSON documents to
python objects. However, I'm finding it cumbersome to convert responses
from the database to schema.Document objects in order to have access to
general purpose methods such as load, store and items. The similar names
also complicates keeping track of the class of an object.
Original issue: http://code.google.com/p/couchdb-python/issues/detail?id=40
The text was updated successfully, but these errors were encountered: