Ticket #10070: svnpatch.diff
File svnpatch.diff, 1.3 KB (added by , 16 years ago) |
---|
-
django/db/backends/sqlite3/base.py
186 186 you'll need to use "%%s". 187 187 """ 188 188 def execute(self, query, params=()): 189 query = self.convert_query(query, len(params))189 query = self.convert_query(query, params) 190 190 return Database.Cursor.execute(self, query, params) 191 191 192 192 def executemany(self, query, param_list): 193 193 try: 194 query = self.convert_query(query, len(param_list[0]))194 query = self.convert_query(query, param_list[0]) 195 195 return Database.Cursor.executemany(self, query, param_list) 196 196 except (IndexError,TypeError): 197 197 # No parameter list provided 198 198 return None 199 199 200 def convert_query(self, query, num_params): 201 return query % tuple("?" * num_params) 200 def convert_query(self, query, params): 201 if type(params) == dict: 202 new_query = query 203 for param in params: 204 new_query = new_query.replace("%("+param+")s",":"+param) 205 return new_query 206 else: 207 return query % tuple("?" * len(params)) 202 208 203 209 def _sqlite_extract(lookup_type, dt): 204 210 if dt is None: