Changeset 37592 for trunk/ippToPsps/jython/objectbatch.py
- Timestamp:
- Nov 12, 2014, 2:58:40 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/objectbatch.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/objectbatch.py
r37577 r37592 87 87 return True 88 88 89 ''' 90 Updates table and generates pspsuniqueids 91 ''' 92 93 def updatePspsUniqueIDs(self): 94 sql = "UPDATE ObjectThin join (select @r:=@r+1 rownum, objID from \ 95 (select @r:=0) r, ObjectThin t) as foo using (objID) set \ 96 uniquePspsP2id = ((" +str(self.batchID) "*1000000000 ) + rownum)"; 97 try: self.scratchDb.execute(sql) 98 except: 99 self.logger.errorPair('failed sql',sql) 100 return 101 102 103 89 104 ''' 90 105 Applies indexes to the IPP tables … … 429 444 ##self.dvoObjects.purgeRegion(self.region) 430 445 446 self.updatePspsUniqueIDs() 447 431 448 self.setMinMaxObjID(["ObjectThin"]) 432 449 … … 439 456 cptTableName = self.scratchDb.getDbFriendlyTableName(self.region + ".cpt") 440 457 cpsTableName = self.scratchDb.getDbFriendlyTableName(self.region + ".cps") 441 self.logger.infoPair("Populating MeanObject from ", "ObjectThin")442 443 sql = "INSERT INTO MeanObject ( objID ) SELECT objIDFROM ObjectThin"458 self.logger.infoPair("Populating MeanObject.objid and pspsUniqueOBid from ", "ObjectThin") 459 460 sql = "INSERT INTO MeanObject ( objID, pspsUniqueOBid ) SELECT objID, pspsUniqueOBid FROM ObjectThin" 444 461 try: 445 462 self.scratchDb.execute(sql) … … 450 467 self.logger.infoPair("Adding 'row' columns to", "MeanObject table") 451 468 self.scratchDb.addRowCountColumn("MeanObject", "row") 452 469 470 471 472 453 473 454 474 ##self.scratchDb.addRowCountColumn(cpsTableName, "row")
Note:
See TracChangeset
for help on using the changeset viewer.
