summaryrefslogtreecommitdiff
path: root/django/core/db/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/db/base.py')
-rw-r--r--django/core/db/base.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/django/core/db/base.py b/django/core/db/base.py
deleted file mode 100644
index 62cca9d0be..0000000000
--- a/django/core/db/base.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from time import time
-
-class CursorDebugWrapper:
- def __init__(self, cursor, db):
- self.cursor = cursor
- self.db = db
-
- def execute(self, sql, params=[]):
- start = time()
- result = self.cursor.execute(sql, params)
- stop = time()
- self.db.queries.append({
- 'sql': sql % tuple(params),
- 'time': "%.3f" % (stop - start),
- })
- return result
-
- def executemany(self, sql, param_list):
- start = time()
- result = self.cursor.executemany(sql, param_list)
- stop = time()
- self.db.queries.append({
- 'sql': 'MANY: ' + sql + ' ' + str(tuple(param_list)),
- 'time': "%.3f" % (stop - start),
- })
- return result
-
- def __getattr__(self, attr):
- if self.__dict__.has_key(attr):
- return self.__dict__[attr]
- else:
- return getattr(self.cursor, attr)