Changeset 1770 for pykota/trunk

Show
Ignore:
Timestamp:
10/04/04 18:11:38 (20 years ago)
Author:
jalet
Message:

Now outputs page counters when dumping user groups quotas

Files:
1 modified

Legend:

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

    r1769 r1770  
    2222# 
    2323# $Log$ 
     24# Revision 1.51  2004/10/04 16:11:38  jalet 
     25# Now outputs page counters when dumping user groups quotas 
     26# 
    2427# Revision 1.50  2004/10/04 16:01:15  jalet 
    2528# More complete dumps for groups and groups quotas 
     
    133136    def extractGpquotas(self) : 
    134137        """Extracts all grouppquota records.""" 
    135         result = self.doRawSearch("SELECT groups.groupname,printers.printername,grouppquota.* FROM groups,printers,grouppquota WHERE groups.id=grouppquota.groupid AND printers.id=grouppquota.printerid ORDER BY grouppquota.id ASC") 
     138        result = self.doRawSearch("SELECT groups.groupname,printers.printername,grouppquota.*,sum(pagecounter) AS pagecounter,sum(lifepagecounter) AS lifepagecounter FROM groups,printers,grouppquota,userpquota WHERE groups.id=grouppquota.groupid AND printers.id=grouppquota.printerid AND userpquota.printerid=grouppquota.printerid AND userpquota.userid IN (SELECT userid FROM groupsmembers WHERE groupsmembers.groupid=grouppquota.groupid) GROUP BY grouppquota.id,grouppquota.groupid,grouppquota.printerid,grouppquota.softlimit,grouppquota.hardlimit,grouppquota.datelimit,groups.groupname,printers.printername ORDER BY grouppquota.id") 
    136139        return self.prepareRawResult(result) 
    137140