Wrapper for pg or pg.js that runs queries or transactions from a generator using promises.