a2768ae095d0100fb77e82df54174eee7fab6f40
3 class DbException(Exception):
5 def __init__(self
, message
, http_code
=404):
6 # TODO change to http.HTTPStatus instead of int that allows .value and .name
7 self
.http_code
= http_code
8 Exception.__init
__(self
, message
)
16 def db_connect(self
, config
):
19 def db_disconnect(self
):
22 def get_list(self
, table
, filter={}):
25 def get_one(self
, table
, filter={}, fail_on_empty
=True, fail_on_more
=True):
28 def create(self
, table
, indata
):
31 def del_list(self
, table
, filter={}):
34 def del_one(self
, table
, filter={}, fail_on_empty
=True):