Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

Changeset 140

Show
Ignore:
Timestamp:
01/09/06 04:48:46
Author:
fumanchu
Message:

Bah. Fixes for SM.destroy methods (new use_asterisk_to_get_all flag).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/storage/db.py

    r139 r140  
    755755    sql_name_caseless = False 
    756756    close_connection_method = 'close' 
     757    use_asterisk_to_get_all = False 
    757758     
    758759    decompiler = SQLDecompiler 
     
    11411142    def destroy(self, unit): 
    11421143        """destroy(unit). Delete the unit.""" 
    1143         self.execute(u'DELETE * FROM %s WHERE %s;' % 
    1144                      (self.table_name(unit.__class__.__name__), 
     1144        if self.use_asterisk_to_get_all: 
     1145            star = " *" 
     1146        else: 
     1147            star = "" 
     1148        self.execute(u'DELETE%s FROM %s WHERE %s;' % 
     1149                     (star, self.table_name(unit.__class__.__name__), 
    11451150                      self.id_clause(unit))) 
    11461151     
  • trunk/storage/storeado.py

    r139 r140  
    677677    # Jet Connections and Recordsets are always free-threaded. 
    678678     
     679    use_asterisk_to_get_all = True 
     680     
    679681    decompiler = ADOSQLDecompiler_MSAccess 
    680682    typeAdapter = FieldTypeAdapter_MSAccess() 
  • trunk/storage/storesqlite.py

    r139 r140  
    182182            conn = None 
    183183            raise x 
    184      
    185     def destroy(self, unit): 
    186         """destroy(unit). Delete the unit.""" 
    187         self.execute(u'DELETE FROM %s WHERE %s = %s;' % 
    188                      (self.table_name(unit.__class__.__name__), 
    189                       self.id_clause(unit))) 
    190184     
    191185    def _join(self, unitjoin):