Make queries *without* groupBy work again.

This commit is contained in:
Danny B 2012-09-24 00:51:22 +11:00
parent cc88aa701e
commit 97400eb9ad

View File

@ -720,6 +720,7 @@ makeWhere conn (Where (ERaw _ f)) = first ("\nWHERE " <>) (f conn)
makeGroupBy :: Connection -> GroupByClause -> (TLB.Builder, [PersistValue])
makeGroupBy _ (GroupBy []) = (mempty, [])
makeGroupBy conn (GroupBy fields) = first ("\nGROUP BY " <>) build
where
build = uncommas' $ map (\(SomeValue (ERaw _ f)) -> f conn) fields