Re: [Snowdrift-dev] [PATCH] crowdmatch: Use (SqlPersistT env) monad to allow combining queries

2017-07-08 Thread Bryan Richter
On Sun, Jul 09, 2017 at 04:56:29AM +0300, fr33domlover wrote: > > Before this commit, crowdmatch actions run database queries separately > inside them like a black box. That means in practice many applications > of `runDB`, one per query, so a transaction per query. This is an > unnecessary

[Snowdrift-dev] [PATCH] crowdmatch: Use (SqlPersistT env) monad to allow combining queries

2017-07-08 Thread fr33domlover
From: fr33domlover Before this commit, crowdmatch actions run database queries separately inside them like a black box. That means in practice many applications of `runDB`, one per query, so a transaction per query. This is an unnecessary waste, and doesn't gain much (or