Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Q syntax (db :: (* -> *) -> *) s a
- type QExpr = QGenExpr QValueContext
- newtype QGenExpr context syntax s t = QExpr (TablePrefix -> syntax)
- type family QExprToIdentity x
- type family QExprToField x
- data QWindow syntax s
- type QWindowFrame = QGenExpr QWindowFrameContext
- type Projectible = ProjectibleWithPredicate AnyType
- data Aggregation syntax s a
- class IsSql92SelectSyntax selectSyntax => HasQBuilder selectSyntax where
Documentation
data Q syntax (db :: (* -> *) -> *) s a Source #
The type of queries over the database db
returning results of type a
.
The s
argument is a threading argument meant to restrict cross-usage of
QExpr
s. syntax
represents the SQL syntax that this query is building.
newtype QGenExpr context syntax s t Source #
The type of lifted beam expressions that will yield the haskell type t
.
context
is a type-level representation of the types of expressions this
can contain. For example, QAggregateContext
represents expressions that
may contain aggregates, and QWindowingContext
represents expressions that
may contain OVER
.
syntax
is the expression syntax being built (usually a type that
implements IsSql92ExpressionSyntax
at least, but not always).
s
is a state threading parameter that prevents QExpr
s from incompatible
sources to be combined. For example, this is used to prevent monadic joins
from depending on the result of previous joins (so-called LATERAL
joins).
QExpr (TablePrefix -> syntax) |
type family QExprToIdentity x Source #
type QExprToIdentity () Source # | |
type QExprToIdentity (table (Nullable c)) Source # | |
type QExprToIdentity (table (QGenExpr context syntax s)) Source # | |
type QExprToIdentity (a, b) Source # | |
type QExprToIdentity (Vector n a) Source # | |
type QExprToIdentity (a, b, c) Source # | |
type QExprToIdentity (a, b, c, d) Source # | |
type QExprToIdentity (QGenExpr context syntax s a) Source # | |
type QExprToIdentity (a, b, c, d, e) Source # | |
type QExprToIdentity (a, b, c, d, e, f) Source # | |
type QExprToIdentity (a, b, c, d, e, f, g) Source # | |
type QExprToIdentity (a, b, c, d, e, f, g, h) Source # | |
type family QExprToField x Source #
type QExprToField () Source # | |
type QExprToField (table (Nullable (QGenExpr context syntax s))) Source # | |
type QExprToField (table (QGenExpr context syntax s)) Source # | |
type QExprToField (a, b) Source # | |
type QExprToField (Vector n a) Source # | |
type QExprToField (a, b, c) Source # | |
type QExprToField (a, b, c, d) Source # | |
type QExprToField (QGenExpr ctxt syntax s a) Source # | |
type QExprToField (a, b, c, d, e) Source # | |
type QExprToField (a, b, c, d, e, f) Source # | |
type QExprToField (a, b, c, d, e, f, g) Source # | |
type QExprToField (a, b, c, d, e, f, g, h) Source # | |
data QWindow syntax s Source #
ProjectibleWithPredicate WindowFrameContext syntax (QWindow syntax s) Source # | |
data Aggregation syntax s a Source #
class IsSql92SelectSyntax selectSyntax => HasQBuilder selectSyntax where Source #
buildSqlQuery :: Projectible (Sql92SelectExpressionSyntax selectSyntax) a => TablePrefix -> Q selectSyntax db s a -> selectSyntax Source #