IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 29, 2014, 9:52:00 AM (12 years ago)
Author:
eugene
Message:

scatter some debugging prints around; replace safeDictionaryAccess (terrible name) with getKeyValue; fix use of strings vs sql words in insert queries; fix detections for new schema; remove use of old dvograbber-based code; clean some avoidable errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140717/ippToPsps/jython/sqlUtility.py

    r37129 r37133  
    1616   
    1717    def group(self,field,value):
     18        print "group field: " + field + ", value: " + value
    1819        self.fields.append(field)
    1920        self.values.append(value)
    2021        return
    2122
    22     def make(self,middleString,endString):
     23    def makeRaw(self,middleString,endString):
    2324
    2425        output = self.startString
     
    4041        return output
    4142
     43    def make(self,middleString,endString):
     44
     45        output = self.startString
     46
     47        for i in range(len(self.fields)):
     48            output += self.fields[i]
     49            if (i < len(self.fields) - 1):
     50                output += ", "
     51
     52        output += middleString
     53
     54        for i in range(len(self.values)):
     55            output += "'" + self.values[i] + "'"
     56            if (i < len(self.values) - 1):
     57                output += ", "
     58       
     59        output += endString
     60
     61        return output
     62
    4263    # when we do a sql insert, we have a command that looks like this:
    4364    # INSERT INTO Table (field1, field2,...) OPERATION (value1, value2,...)
Note: See TracChangeset for help on using the changeset viewer.