Changeset 31820 for trunk/ippToPsps/jython/mysql.py
- Timestamp:
- Jul 1, 2011, 3:59:16 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/mysql.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/mysql.py
r31807 r31820 112 112 except: pass 113 113 #self.logger.warn("Index already in place on '" + column + "' for table '" + table + "'") 114 115 ''' 116 Alters a column to be the primary key 117 ''' 118 def makeColumnPrimaryKey(self, table, column): 119 120 self.logger.debug("Making '"+column+"' the primary key on table '"+table+"'") 121 122 sql = "ALTER TABLE " + table + " ADD PRIMARY KEY (" + column + ")" 123 try: 124 self.execute(sql) 125 except: pass 126 #self.logger.warn("Index already in place on '" + column + "' for table '" + table + "'") 114 127 ''' 115 128 Adds an index to the supplied table and column … … 143 156 return rs 144 157 158 ''' 159 TODO 160 ''' 161 def executeUpdatableQuery(self, sql): 162 163 stmt = self.con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE) 164 rs = stmt.executeQuery(sql) 165 #stmt.close() 166 return rs 145 167 ''' 146 168 Returns a list of column names for this table
Note:
See TracChangeset
for help on using the changeset viewer.
