diff options
author | emkael <emkael@tlen.pl> | 2017-10-03 16:20:22 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-10-03 16:20:22 +0200 |
commit | 37df04c91788d023681c8a7015b9807764974a1d (patch) | |
tree | 0b5c108681b5ea222e2c6d0f7358b372c893f885 /jfr_playoff/db.py | |
parent | 31f3d7ed154c24ffd9c84448effb1d87b7456ade (diff) |
Ability to classify teams from specified position according to sepatare tournament results
Diffstat (limited to 'jfr_playoff/db.py')
-rw-r--r-- | jfr_playoff/db.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/jfr_playoff/db.py b/jfr_playoff/db.py index b94f3d5..ad32ac8 100644 --- a/jfr_playoff/db.py +++ b/jfr_playoff/db.py @@ -16,7 +16,15 @@ class PlayoffDB(object): def get_cursor(self): return self.db_cursor - def fetch(self, db_name, sql, params): + def __execute_query(self, db_name, sql, params): self.db_cursor.execute(sql.replace('#db#', db_name), params) + + def fetch(self, db_name, sql, params): + self.__execute_query(db_name, sql, params) row = self.db_cursor.fetchone() return row + + def fetch_all(self, db_name, sql, params): + self.__execute_query(db_name, sql, params) + results = self.db_cursor.fetchall() + return results |