Method : POST
URI : /db/<dbname>/query
Body :
{"sql":"<sql query...>"}
1. list of all registered notification templates
{"sql":"select * from reg_notif"}
2. list of all notifications for a registered notification template
{"sql":"select * from notif where notifid = <id>"}
3. list of all open notifications
{"sql":"select * from notif where openflag = 1"}
4. count of all notifications for a given notification id
{"sql":"select count(*) from notif where notifid = <id>"}
5. count of all open notifications
{"sql":"select count(*) from notif where notifid = <id> and openflag = 1"}