Skip to content

Instantly share code, notes, and snippets.

@smurphy8
Created June 24, 2014 16:39
Show Gist options
  • Save smurphy8/629f205ec912ebed132d to your computer and use it in GitHub Desktop.
Save smurphy8/629f205ec912ebed132d to your computer and use it in GitHub Desktop.
buildQuery (AlarmLogLookupId mlul mcll msll magl mgst msTime meTime) = let
lulQuery = (\lul -> [OnpingTagCombinedLocationId ==. lul]) <$> mlul
mcllQuery = (\cll -> [OnpingTagCombinedLocationId ==. cll]) <$> mcll
in concat $ catMaybes [lulQuery,mcllQuery]
someFunction = do
rslt <- buildQuery ...
runDB $ do
selectList rslt []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment