IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 10, 2015, 12:40:44 PM (11 years ago)
Author:
eugene
Message:

make code less forgiving: sql execute aborts on failures; deal with various hidden problems: add IF EXISTS to drop table operations to avoid raising unneeded error, make sure tables exist before trying to add indexes, test for existence of the stack _xsrc, _xfit, etc tables (and skip if missing); fix sqlLine.group to cast inputs to string before performing string ops; getKeyFloat now returns a float value which is safe with sqlLine.group, but can be used in a math expression; use python math. operators as needed (sqrt, fabs); fulltest.sh runs for camera, stack, object stages; update dvoSkyTable to use REGION_ID instead of special word INDEX; add existsClient method (avoid using mysql failure as a test for table existence); no need to test for exceptions to sql.execute since we abort on failure; replace esoteric SQL with dropTable calls; trap errors in stilts.treads in setupScratchdb; drop StackObjecThin and StackDetOffMeta along with other stack scratch tables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/sqlUtility.py

    r37246 r38837  
    1212        self.fields = []
    1313        self.values = []
    14         self.startString = startString
     14        self.startString = str(startString)
    1515        return
    1616   
    1717    def group(self,field,value):
    18         self.fields.append(field)
    19         self.values.append(value)
     18        self.fields.append(str(field))
     19        self.values.append(str(value))
     20        print "* " + str(field) + " = " + str(value)
    2021        return
    2122
     
    3031                output += ", "
    3132
    32         output += " " + middleString + "  "
     33        output += " " + str(middleString) + "  "
    3334
    3435        for i in range(len(self.values)):
     
    3738                output += ", "
    3839       
    39         output += " " + endString
     40        output += " " + str(endString)
    4041
    4142        return output
     
    5152                output += ", "
    5253
    53         output += " " + middleString + " "
     54        output += " " + str(middleString) + " "
    5455
    5556        for i in range(len(self.values)):
     
    5859                output += ", "
    5960       
    60         output += " " + endString
     61        output += " " + str(endString)
    6162
    6263        return output
     
    7273                output += ", "
    7374       
    74         output += " " + endString
     75        output += " " + str(endString)
    7576
    7677        return output
Note: See TracChangeset for help on using the changeset viewer.