summaryrefslogtreecommitdiff
path: root/jfr_playoff/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'jfr_playoff/db.py')
-rw-r--r--jfr_playoff/db.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/jfr_playoff/db.py b/jfr_playoff/db.py
index aa0c2e2..8457dd4 100644
--- a/jfr_playoff/db.py
+++ b/jfr_playoff/db.py
@@ -13,7 +13,10 @@ class PlayoffDB(object):
)
self.db_cursor = self.database.cursor(buffered=True)
- def fetch(self, db, sql, params):
- self.db_cursor.execute(sql.replace('#db#', db), params)
+ def get_cursor(self):
+ return self.db_cursor
+
+ def fetch(self, db_name, sql, params):
+ self.db_cursor.execute(sql.replace('#db#', db_name), params)
row = self.db_cursor.fetchone()
return row