Trees | Indices | Help |
|
---|
|
object --+ | cBusinessDBObject
Represents business objects in the database. Rules: - instances ARE ASSUMED TO EXIST in the database - PK construction (aPK_obj): DOES verify its existence on instantiation (fetching data fails) - Row construction (row): allowed by using a dict of pairs field name: field value (PERFORMANCE improvement) - does NOT verify FK target existence - does NOT create new entries in the database - does NOT lazy-fetch fields on access Class scope SQL commands and variables: <_cmd_fetch_payload> - must return exactly one row - where clause argument values are expected in self.pk_obj (taken from __init__(aPK_obj)) - must return xmin of all rows that _cmds_store_payload will be updating, so views must support the xmin columns of their underlying tables <_cmds_store_payload> - one or multiple "update ... set ... where xmin_* = ..." statements which actually update the database from the data in self._payload, - the last query must refetch the XMIN values needed to detect concurrent updates, their field names had better be the same as in _cmd_fetch_payload <_updatable_fields> - a list of fields available for update via object['field']
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
Inherited from |
Method Details |
Init business object.
|
str(x)
|
Store updated values (if any) in database. Optionally accepts a pre-existing connection - returns a tuple (<True|False>, <data>) - True: success - False: an error occurred * data is (error, message) * for error meanings see gmPG2.run_rw_queries() |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Feb 9 04:01:05 2010 | http://epydoc.sourceforge.net |