Home | Trees | Indices | Help |
---|
|
object --+ | DocumentSchema --+ | DocumentBase
Base Document object that map a CouchDB Document. It allow you to statically map a document by providing fields like you do with any ORM or dynamically. Ie unknown fields are loaded as object property that you can edit, datetime in iso3339 format are automatically translated in python types (date, time & datetime) and decimal too. Example of documentass .. code-block:: python from couchdbkit.schema import * class MyDocument(Document): mystring = StringProperty() myotherstring = unicode() # just use python types Document fields can be accessed as property or key of dict. These are similar : ``value = instance.key or value = instance['key'].`` To delete a property simply do ``del instance[key'] or delattr(instance, key)``
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
_db = None hash(x) |
|||
_doc_type =
|
|||
Inherited from |
|
|||
new_document | |||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Save multiple documents in database.
|
Save multiple documents in database.
|
|
new_document
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri May 4 11:48:41 2012 | http://epydoc.sourceforge.net |