(self)
| 345 | r[ix] = t.format(str(r[ix])) |
| 346 | |
| 347 | def execute_query(self): |
| 348 | cursor = self.connection.cursor() |
| 349 | start_time = time() |
| 350 | |
| 351 | try: |
| 352 | with transaction.atomic(self.connection.alias): |
| 353 | cursor.execute(self.sql) |
| 354 | except DatabaseError as e: |
| 355 | cursor.close() |
| 356 | raise e |
| 357 | |
| 358 | return cursor, ((time() - start_time) * 1000) |
| 359 | |
| 360 | |
| 361 | class ColumnHeader: |