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

Method __init__

explorer/models.py:271–285  ·  view source on GitHub ↗
(self, sql, connection)

Source from the content-addressed store, hash-verified

269class QueryResult:
270
271 def __init__(self, sql, connection):
272
273 self.sql = sql
274 self.connection = connection
275
276 cursor, duration = self.execute_query()
277
278 self._description = cursor.description or []
279 self._data = [list(r) for r in cursor.fetchall()]
280 self.duration = duration
281
282 cursor.close()
283
284 self._headers = self._get_headers()
285 self._summary = {}
286
287 @property
288 def data(self):

Callers

nothing calls this directly

Calls 2

execute_queryMethod · 0.95
_get_headersMethod · 0.95

Tested by

no test coverage detected