class DbException(Exception):
def __init__(self, message, http_code=HTTPStatus.NOT_FOUND):
+ # TODO change to http.HTTPStatus instead of int that allows .value and .name
self.http_code = http_code
Exception.__init__(self, "database exception " + message)
pass
def get_list(self, table, filter={}):
- pass
+ raise DbException("Method 'get_list' not implemented")
def get_one(self, table, filter={}, fail_on_empty=True, fail_on_more=True):
- pass
+ raise DbException("Method 'get_one' not implemented")
def create(self, table, indata):
- pass
+ raise DbException("Method 'create' not implemented")
def del_list(self, table, filter={}):
- pass
+ raise DbException("Method 'del_list' not implemented")
def del_one(self, table, filter={}, fail_on_empty=True):
- pass
+ raise DbException("Method 'del_one' not implemented")