Esempio n. 1
0
 def get( self, fields = None, just_return_sql = False, recurse = True,
         reload_ = False):
     if not self.fqtn in (
         'collorg.core.base_table', 'collorg.core.oid_table'):
         return TClass.get(
             self,
             fields = fields, just_return_sql = just_return_sql,
             reload_ = reload_, recurse = recurse )
     obj = TClass.get(
         self, fields = fields, just_return_sql = just_return_sql,
         reload_ = reload_)
     if just_return_sql:
         return obj
     return self.db.table(
         self.cog_fqtn_.value, cog_oid_ = self.cog_oid_.value ).get(
             reload_ = reload_)
Esempio n. 2
0
 def __init__( self, db, **kwargs ):
     #>>> AUTO_COG DOC. DO NOT EDIT
     """
     * _db : ref. to database. usage: self.db.table(fqtn)
     fields list:
     * cog_oid_ : c_oid, PK, uniq, not null
     * cog_fqtn_ : c_fqtn, PK, not null
     * cog_signature_ : text
     * cog_test_ : bool
     * cog_creat_date_ : timestamp
     * cog_modif_date_ : timestamp
     * cog_environment_ : c_oid, FK
     * cog_state_ : text
     """
     #<<< AUTO_COG DOC. Your code goes after
     self._cog_order_by = []
     TClass.__init__( self, db, **kwargs )