Home | Trees | Indices | Help |
|
---|
|
object --+ | dbobject
Base class for all database aware classes.
It contains a number of helper methods which are called like this: __help__(). You may safely add db-aware properties, regular properties and methods.
|
|||
|
__result__ This attribute must be a class which inherits from result. |
||
| __metaclass__ |
|
|||
|
__init__(self,
**kw) Construct a dbobj from key word arguments. |
||
|
__insert__(self,
ds) This method is called by datasource.insert() after the insert query has been performed. |
||
|
__ds__(self) Return this dbobject's datasource (the one it is stored in). |
||
| __is_stored__(self) | ||
|
__repr__(self) Return a human readable (more or less) representation of this dbobject. |
||
|
__eq__(self,
other) Two dbobjects are considered equal, if they have the same dbclass and the same primary key. |
||
|
__ne__(self,
other) Same as __eq__, just the other way 'round ;-) |
||
|
__widget_specs__(self,
module_name) Return a list of all widget_specs for the module named module_name. |
||
| __delete__(self) | ||
| __update_from_dict__(self, kw) | ||
Inherited from |
|
|||
|
__from_result__(cls,
ds,
info) This constructor is called by datasource.datasource_base when an object is created using a row retreived from the RDBMS. |
||
|
__dbproperties__(cls) Return the datatype objects among this dbobjects attributes as a dict like { name: property, ... |
||
|
__dbproperty__(cls,
name=None) Return a dbproperty by its name. |
||
|
__has_dbproperty__(cls,
name) Return whether this dbclass has a property named `name`. |
||
|
__select_columns__(cls) A list of columns to select from the relation to construct one of these. |
|
|||
|
__primary_key__ = 'id' The primary key must be either |
||
|
__relation__ Name of the relation this dbclass' values are stored in. |
||
|
__schema__ String containing the name of the schema this dbclass' relatin resides in. |
|
|||
|
__model__ Property class the will return the module object of the module the owning class was loaded from. |
||
Inherited from |
|
me = person(firstname='Diedrich', lastname='Vorberg')firstname and lastname are dbproperties. The reserved parameter __ds allows you to pass a datasource to objects that are not inserted yet and might need a ds to construct views and the like.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__primary_key__The primary key must be either
|
__relation__Name of the relation this dbclass' values are stored in. Defaults to the class' name. May be set to a string or an sql.relation instance. |
__schema__String containing the name of the schema this dbclass' relatin resides in. |
|
__model__Property class the will return the module object of the module the owning class was loaded from.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Wed Feb 20 18:17:26 2008 | http://epydoc.sourceforge.net |