MCPcopy Create free account
hub / github.com/explorerhq/sql-explorer / execute_query

Method execute_query

explorer/models.py:347–358  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
361class ColumnHeader:

Callers 6

__init__Method · 0.95
test_writing_unicodeMethod · 0.95
test_writing_jsonMethod · 0.95
test_writing_excelMethod · 0.95

Calls 1

executeMethod · 0.80

Tested by 5

test_writing_unicodeMethod · 0.76
test_writing_jsonMethod · 0.76
test_writing_excelMethod · 0.76