rel8-internal
Safe HaskellNone
LanguageHaskell2010

Rel8.Internal.Expr.Eq

Synopsis

Documentation

(==.) :: Sql DBEq a => Expr a -> Expr a -> Expr Bool infix 4 Source #

Compare two expressions for equality.

This corresponds to the SQL IS NOT DISTINCT FROM operator, and will equate null values as true. This differs from = which would return null. This operator matches Haskell's == operator. For an operator identical to SQL =, see ==?.

(/=.) :: Sql DBEq a => Expr a -> Expr a -> Expr Bool infix 4 Source #

Test if two expressions are different (not equal).

This corresponds to the SQL IS DISTINCT FROM operator, and will return false when comparing two null values. This differs from ordinary <> which would return null. This operator is closer to Haskell's /= operator. For an operator identical to SQL <>, see /=?.

(==?) :: DBEq a => Expr (Maybe a) -> Expr (Maybe a) -> Expr Bool infix 4 Source #

Test if two expressions are equal. This operator is usually the best choice when forming join conditions, as PostgreSQL has a much harder time optimizing a join that has multiple True conditions.

This corresponds to the SQL = operator, though it will always return a Bool.

(/=?) :: DBEq a => Expr (Maybe a) -> Expr (Maybe a) -> Expr Bool infix 4 Source #

Test if two expressions are different.

This corresponds to the SQL <> operator, though it will always return a Bool.

in_ :: (Sql DBEq a, Foldable f) => Expr a -> f (Expr a) -> Expr Bool Source #

Like the SQL IN operator, but implemented by folding over a list with ==. and ||..