rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Query.Filter

Synopsis

Documentation

filter :: (a -> Expr Bool) -> a -> Query a Source #

filter f x will be a zero-row query when f x is False, and will return x unchanged when f x is True. This is similar to guard, but as the predicate is separate from the argument, it is easy to use in a pipeline of Query transformations.

where_ :: Expr Bool -> Query () Source #

Drop any rows that don't match a predicate. where_ expr is equivalent to the SQL WHERE expr.