implement with-db as a macro rather than function

strip one level from request handler expressions