| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Beam.Query.Types
- data Q syntax (db :: (* -> *) -> *) s a
- type QExpr = QGenExpr QValueContext
- newtype QGenExpr context syntax s t = QExpr (TablePrefix -> syntax)
- type family QExprToIdentity 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
QExprs. 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 QExprs 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).
Constructors
| QExpr (TablePrefix -> syntax) |
Instances
type family QExprToIdentity x Source #
Instances
| 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 # | |
data QWindow syntax s Source #
Instances
| ProjectibleWithPredicate WindowFrameContext syntax (QWindow syntax s) Source # | |
data Aggregation syntax s a Source #
class IsSql92SelectSyntax selectSyntax => HasQBuilder selectSyntax where Source #
Minimal complete definition
Methods
buildSqlQuery :: Projectible (Sql92SelectExpressionSyntax selectSyntax) a => TablePrefix -> Q selectSyntax db s a -> selectSyntax Source #
Instances