Changeset 2771

Show
Ignore:
Timestamp:
03/01/06 15:42:33 (19 years ago)
Author:
jerome
Message:

Modified a method's name.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/sql.py

    r2768 r2771  
    825825            self.doModify(q) 
    826826             
    827     def deleteInTransaction(self, queries) :         
    828         """Does many deletions in a single transaction.""" 
     827    def multipleQueriesInTransaction(self, queries) :         
     828        """Does many modifications in a single transaction.""" 
    829829        self.beginTransaction() 
    830830        try : 
     
    840840        """Deletes many billing codes.""" 
    841841        codeids = ", ".join(["%s" % self.doQuote(b.ident) for b in billingcodes]) 
    842         self.deleteInTransaction([  
     842        self.multipleQueriesInTransaction([  
    843843                    "DELETE FROM billingcodes WHERE id IN (%s)" % codeids,]) 
    844844             
     
    846846        """Deletes many users.""" 
    847847        userids = ", ".join(["%s" % self.doQuote(u.ident) for u in users]) 
    848         self.deleteInTransaction([  
     848        self.multipleQueriesInTransaction([  
    849849                    "DELETE FROM payments WHERE userid IN (%s)" % userids, 
    850850                    "DELETE FROM groupsmembers WHERE userid IN (%s)" % userids, 
     
    856856        """Deletes many groups.""" 
    857857        groupids = ", ".join(["%s" % self.doQuote(g.ident) for g in groups]) 
    858         self.deleteInTransaction([  
     858        self.multipleQueriesInTransaction([  
    859859                    "DELETE FROM groupsmembers WHERE groupid IN (%s)" % groupids, 
    860860                    "DELETE FROM grouppquota WHERE groupid IN (%s)" % groupids, 
     
    864864        """Deletes many printers.""" 
    865865        printerids = ", ".join(["%s" % self.doQuote(p.ident) for p in printers]) 
    866         self.deleteInTransaction([  
     866        self.multipleQueriesInTransaction([  
    867867                    "DELETE FROM printergroupsmembers WHERE groupid IN (%s) OR printerid IN (%s)" % (printerids, printerids), 
    868868                    "DELETE FROM jobhistory WHERE printerid IN (%s)" % printerids, 
     
    875875        printerids = ", ".join(["%s" % self.doQuote(p.ident) for p in printers]) 
    876876        userids = ", ".join(["%s" % self.doQuote(u.ident) for u in users]) 
    877         self.deleteInTransaction([  
     877        self.multipleQueriesInTransaction([  
    878878                    "DELETE FROM jobhistory WHERE userid IN (%s) AND printerid IN (%s)" \ 
    879879                                 % (userids, printerids), 
     
    885885        printerids = ", ".join(["%s" % self.doQuote(p.ident) for p in printers]) 
    886886        groupids = ", ".join(["%s" % self.doQuote(g.ident) for g in groups]) 
    887         self.deleteInTransaction([  
     887        self.multipleQueriesInTransaction([  
    888888                    "DELETE FROM grouppquota WHERE groupid IN (%s) AND printerid IN (%s)" \ 
    889889                                 % (groupids, printerids),])