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

Method log

explorer/models.py:175–186  ·  view source on GitHub ↗
(self, user=None)

Source from the content-addressed store, hash-verified

173 return get_params_for_url(self)
174
175 def log(self, user=None):
176 if user:
177 if user.is_anonymous:
178 user = None
179 ql = QueryLog(
180 sql=self.final_sql(),
181 query_id=self.id,
182 run_by_user=user,
183 database_connection=self.database_connection,
184 )
185 ql.save()
186 return ql
187
188 @property
189 def shared(self):

Callers 9

execute_with_loggingMethod · 0.95
postMethod · 0.95
pivotSetupFunction · 0.80
test_query_logMethod · 0.80
test_get_run_countMethod · 0.80
test_avg_durationMethod · 0.80
test_run_countMethod · 0.80

Calls 3

final_sqlMethod · 0.95
QueryLogClass · 0.85
saveMethod · 0.80

Tested by 6

test_query_logMethod · 0.64
test_get_run_countMethod · 0.64
test_avg_durationMethod · 0.64
test_run_countMethod · 0.64