aboutsummaryrefslogtreecommitdiff
path: root/wqflask/db/call.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-04-30 12:26:19 +0300
committerBonfaceKilz2021-04-30 13:45:15 +0300
commit406eb27859cca232a562c722cbbd37aca2e3be84 (patch)
treeba3fba783e33cc56c535b68bd64d757bc6cde608 /wqflask/db/call.py
parentc7e661b8ff9f70955418fbc4527378904beb0cf4 (diff)
downloadgenenetwork2-406eb27859cca232a562c722cbbd37aca2e3be84.tar.gz
autopep8: Fix E301,E302,E303,E304,E305,E306
Diffstat (limited to 'wqflask/db/call.py')
-rw-r--r--wqflask/db/call.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/wqflask/db/call.py b/wqflask/db/call.py
index 555878ad..9412b376 100644
--- a/wqflask/db/call.py
+++ b/wqflask/db/call.py
@@ -16,6 +16,7 @@ logger = getLogger(__name__)
# from inspect import stack
+
def fetch1(query, path=None, func=None):
"""Fetch one result as a Tuple using either a SQL query or the URI
path to GN_SERVER (when USE_GN_SERVER is True). Apply func to
@@ -35,6 +36,7 @@ GN_SERVER result when set (which should return a Tuple)
else:
return fetchone(query)
+
def fetchone(query):
"""Return tuple containing one row by calling SQL directly (the
original fetchone, but with logging)
@@ -46,6 +48,7 @@ original fetchone, but with logging)
return res.fetchone()
return logger.sql(query, helper)
+
def fetchall(query):
"""Return row iterator by calling SQL directly (the
original fetchall, but with logging)
@@ -57,6 +60,7 @@ original fetchall, but with logging)
return res.fetchall()
return logger.sql(query, helper)
+
def gn_server(path):
"""Return JSON record by calling GN_SERVER