massively refactored, ctx introduced, fetchAll now has got transform and transformResult options, upsert can handle resulting rows now