base package for querying postgres active record style