adding generic db query api.  finally.