More readable conditional

This commit is contained in:
Joe Nelson
2014-12-07 21:32:36 -08:00
parent 4f9132af43
commit d763e27bb2
+2 -1
View File
@@ -133,7 +133,8 @@ app req =
else do else do
tableCols <- map (cs . colName) <$> columns qt tableCols <- map (cs . colName) <$> columns qt
let cols = map cs $ keys obj let cols = map cs $ keys obj
if S.fromList tableCols == S.fromList cols then do if S.fromList tableCols == S.fromList cols
then do
let vals = elems obj let vals = elems obj
H.unit . coerce $ iffNotT H.unit . coerce $ iffNotT
(whereT qq $ update qt cols vals) (whereT qq $ update qt cols vals)