Select rows with some property
You can use all operators of type
Expr a -> Expr a -> Expr Bool
in your restrict, like for example
.==. ./=. .&&.
This example selects all farmers on the farm with farm_id 0
restr =
withDB $ \db ->
do rows <- query db $
do result <- table P.farmers
restrict (result!P.farm_id .==. constant 0)
return result
mapM_ (putStrLn .showP) rows
Frame> restr
0 "John Doe" 0
1 "Jane Doe" 0
Here are all words and functions with references, in alphabetical order
Go to main page