rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Query.Exists

Synopsis

Documentation

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

Checks if a query returns at least one row.

inQuery :: EqTable a => a -> Query a -> Query (Expr Bool) Source #

present :: Query a -> Query () Source #

Produce the empty query if the given query returns no rows. present is equivalent to WHERE EXISTS in SQL.

with :: (a -> Query b) -> a -> Query a Source #

with is similar to filter, but allows the predicate to be a full query.

with f a = a <$ present (f a), but this form matches filter.

withBy :: (a -> b -> Expr Bool) -> Query b -> a -> Query a Source #

Like with, but with a custom membership test.

absent :: Query a -> Query () Source #

Produce the empty query if the given query returns rows. absent is equivalent to WHERE NOT EXISTS in SQL.

without :: (a -> Query b) -> a -> Query a Source #

Filter rows where a -> Query b yields no rows.

withoutBy :: (a -> b -> Expr Bool) -> Query b -> a -> Query a Source #

Like without, but with a custom membership test.