relational-query- Typeful, Modular, Relational, algebraic query engine

Safe HaskellNone




This module defines phantom typed SQL expression object. Contains normal interfaces.


Typed SQL Expression

data Expr p a Source

Phantom typed SQL expression object. Project from projection type p.


ProjectableMaybe (Expr p)

Control phantom Maybe type in SQL expression type Expr.

ProjectableShowSql (Expr p)

Unsafely get SQL term from Expr.

SqlProjectable (Expr p)

Unsafely make Expr from SQL terms.

Show (Expr p a)

Show expression.

valueExpr :: ShowConstantTermsSQL ft => ft -> Expr p ftSource

Typed constant SQL expression from Haskell value.

Type conversion

just :: Expr p ft -> Expr p (Maybe ft)Source

Convert phantom type into Maybe.

fromJust :: Expr p (Maybe ft) -> Expr p ftSource

Allowed only for having or where Expr. So NULL expression result will be possible. Behavior around boolean is strongly dependent on RDBMS impelemetations.

exprAnd :: Expr p Bool -> Expr p Bool -> Expr p BoolSource

AND operator for Expr.