Package couchdb :: Module schema :: Class Document

Class Document



object --+    
         |    
    Schema --+
             |
            Document

Nested Classes

Inherited from Schema: __metaclass__

Instance Methods
 
__repr__(self)
repr(x)
 
store(self, db)
Store the document in the given database.

Inherited from Schema: __delitem__, __getitem__, __init__, __iter__, __len__, __setitem__, unwrap

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Methods
 
load(cls, db, id)
Load a specific document from the given database.
 
query(cls, db, code, content_type='text/javascript', eager=False, **options)
Execute a CouchDB temporary view and map the result values back to objects of this schema.
 
view(cls, db, viewname, eager=False, **options)
Execute a CouchDB named view and map the result values back to objects of this schema.

Inherited from Schema: build, wrap

Properties
  id
  rev

Inherited from object: __class__

Method Details

__repr__(self)
(Representation operator)

 
repr(x)
Overrides: object.__repr__
(inherited documentation)

query(cls, db, code, content_type='text/javascript', eager=False, **options)
Class Method

 

Execute a CouchDB temporary view and map the result values back to objects of this schema.

Note that by default, any properties of the document that are not included in the values of the view will be treated as if they were missing from the document. If you'd rather want to load the full document for every row, set the eager option to True, but note that this will initiate a new HTTP request for every document.

view(cls, db, viewname, eager=False, **options)
Class Method

 

Execute a CouchDB named view and map the result values back to objects of this schema.

Note that by default, any properties of the document that are not included in the values of the view will be treated as if they were missing from the document. If you'd rather want to load the full document for every row, set the eager option to True, but note that this will initiate a new HTTP request for every document.


Property Details

id

Get Method:
unreachable.id(self)

rev

Get Method:
unreachable.rev(self)