migrate trashwang to bowery style db calls
fixed db driver to support more query types