aboutsummaryrefslogtreecommitdiff
path: root/wqflask/db
diff options
context:
space:
mode:
authorPjotr Prins2016-06-23 11:37:19 +0000
committerPjotr Prins2016-06-23 11:37:19 +0000
commitda1db6ae1df0b5c3d539c1d8b2d78d05ebe393e1 (patch)
tree450065716e31195ae00e7f3841fffff538a7a81d /wqflask/db
parent92d2f3f51d4191b079567f251348b316fe35feff (diff)
downloadgenenetwork2-da1db6ae1df0b5c3d539c1d8b2d78d05ebe393e1.tar.gz
Log: SQL queries
Diffstat (limited to 'wqflask/db')
-rw-r--r--wqflask/db/call.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/wqflask/db/call.py b/wqflask/db/call.py
index 4cea7e66..194a7650 100644
--- a/wqflask/db/call.py
+++ b/wqflask/db/call.py
@@ -11,7 +11,7 @@ from utility.benchmark import Bench
from utility.logger import getLogger
logger = getLogger(__name__ )
-from inspect import stack
+# from inspect import stack
def fetch1(query, path=None, func=None):
"""Fetch one result using either a SQL query or the URI path to
@@ -37,8 +37,7 @@ original fetchone, but with logging)
def helper(query):
res = g.db.execute(query)
return res.fetchone()
- callername = stack()[2][3]
- return logger.sql(callername, query, helper)
+ return logger.sql(query, helper)
def fetchall(query):
"""Return row iterator by calling SQL directly (the
@@ -49,8 +48,7 @@ original fetchall, but with logging)
def helper(query):
res = g.db.execute(query)
return res.fetchall()
- callername = stack()[2][3]
- return logger.sql(callername, query, helper)
+ return logger.sql(query, helper)
def gn_server(path):
"""Return JSON record by calling GN_SERVER