3 class DbException(Exception):
5 def __init__(self
, message
, http_code
=404):
6 self
.http_code
= http_code
7 Exception.__init
__(self
, message
)
14 def db_connect(self
, config
):
17 def db_disconnect(self
):
20 def get_list(self
, table
, filter={}):
23 def get_one(self
, table
, filter={}, fail_on_empty
=True, fail_on_more
=True):
26 def create(self
, table
, indata
):
29 def del_list(self
, table
, filter={}):
32 def del_one(self
, table
, filter={}, fail_on_empty
=True):