From 97400eb9adbc93a799eae2dfe1cad0ac7af124e0 Mon Sep 17 00:00:00 2001 From: Danny B Date: Mon, 24 Sep 2012 00:51:22 +1100 Subject: [PATCH] Make queries *without* groupBy work again. --- src/Database/Esqueleto/Internal/Sql.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Database/Esqueleto/Internal/Sql.hs b/src/Database/Esqueleto/Internal/Sql.hs index 82085f4..492a12d 100644 --- a/src/Database/Esqueleto/Internal/Sql.hs +++ b/src/Database/Esqueleto/Internal/Sql.hs @@ -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