Changeset 37917 for trunk/ippToPsps/jython/detectionbatch.py
- Timestamp:
- Feb 20, 2015, 1:19:35 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/detectionbatch.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/detectionbatch.py
r37763 r37917 611 611 612 612 def updatePspsUniqueIDs(self,table, ota): 613 sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, objID from \ 614 (select @r:=0) r, "+table+" t) as foo using (objID) set \ 615 uniquePspsP2id = ((" +str(self.batchID)+ "*1000000000 ) \ 616 + (" +str(ota) + "*10000000 )+rownum)" 613 #sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, objID from \ 614 #(select @r:=0) r, "+table+" t) as foo using (objID) set \ 615 #uniquePspsP2id = ((" +str(self.batchID)+ "*1000000000 ) \ 616 #+ (" +str(ota) + "*10000000 )+rownum)" 617 sql = "UPDATE "+table+" set uniquePspsP2id = (("+str(self.batchID)+"*1000000000 ) + (" +str(ota) + "*10000000 )+ row)" 617 618 try: self.scratchDb.execute(sql) 618 619 except: … … 647 648 #self.logger.info("successful populate "); 648 649 # now add DVO IDs 650 self.logger.infoPair("Adding 'row' column to ", "Detection_"+chipname) 651 #detection has a primary index, so don't add, use this one 652 self.scratchDb.addRowCountColumnNoKey("Detection_"+chipname, "row") 649 653 self.updateDvoIDs("Detection_" + chipname, self.imageIDs[chipname]) 650 654 #self.logger.info("updated dvoids") 651 655 results['NULLOBJID'] = self.scratchDb.reportAndDeleteRowsWithNULLS("Detection_" + chipname, "objID") 652 656 #self.logger.info("deleted nulls") 657 658 ota = x*10+y 659 660 653 661 self.logger.info("add psps unique p2 ids") 654 ota = x*10+y655 662 self.updatePspsUniqueIDs("Detection_" + chipname, ota) 663 self.logger.infoPair("Dropping 'row' column from ", "Detection_"+chipname) 664 self.scratchDb.dropColumn("Detection_"+chipname,"row") 656 665 self.updateImageID("Detection_" + chipname, x, y) 657 666 #self.logger.info("updateImageId")
Note:
See TracChangeset
for help on using the changeset viewer.
