>>> runLazy_ $ \p -> p != "good" "good"
>>> runLazy_ $ \p -> do q <- promise_; p != "yay! " ++ demand q; q != "it works." "yay! it works."
>>> runLazy_ $ \p -> return () *** Exception: BrokenPromise
>>> runLazy (\p -> return ()) "default" "default"
selectSimon :: MonadIO m => ReaderT SqlBackend m [Entity User] selectSimon = selectList [UserName !=. "SPJ" ] []The above query when applied on dataset-1, will produce this:
+-----+-----+-----+ |id |name |age | +-----+-----+-----+ |2 |Simon|41 | +-----+-----+-----+
v1 <- o .:? "opt_field_with_dfl" .!= "default_val" v2 <- o .: "mandatory_field" v3 <- o .:? "opt_field2"