Created
July 6, 2018 09:52
-
-
Save anapaulagomes/cfa0b4bdc650f78047cd1c1b8576189e to your computer and use it in GitHub Desktop.
Scaffold for db helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DbWorker: | |
"""Doing the hard work on the DB.""" | |
def __init__(self, queries): | |
self.queries = queries # old tables | |
def _connect(self, credentials): | |
# TODO here only db connection stuff - must return the cursor | |
# TODO must thrown an exception in error cases | |
pass | |
def _select_and_insert(): | |
# TODO use self.cursor | |
pass | |
def do(self): | |
self.cursor = self._connect() | |
self._select_and_insert() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment