| Copyright | 2013 Kei Hibino |
|---|---|
| License | BSD3 |
| Maintainer | ex8k.hibino@gmail.com |
| Stability | experimental |
| Portability | unknown |
| Safe Haskell | None |
| Language | Haskell2010 |
Database.Relational.Query.Monad.Type
Contents
Description
This module defines core query type.
- type ConfigureQuery = Qualify (QueryConfig Identity)
- configureQuery :: ConfigureQuery q -> Config -> q
- qualifyQuery :: a -> ConfigureQuery (Qualified a)
- askConfig :: ConfigureQuery Config
- type QueryCore = Restrictings Flat (QueryJoin ConfigureQuery)
- extractCore :: QueryCore a -> ConfigureQuery (((a, QueryRestriction Flat), JoinProduct), Duplication)
- type OrderedQuery c m p r = Orderings c m (PlaceHolders p, Projection c r)
Core query monad
type ConfigureQuery = Qualify (QueryConfig Identity) Source
Thin monad type for untyped structure.
configureQuery :: ConfigureQuery q -> Config -> q Source
Run ConfigureQuery monad with initial state to get only result.
qualifyQuery :: a -> ConfigureQuery (Qualified a) Source
Get qualifyed table form query.
askConfig :: ConfigureQuery Config Source
Read configuration.
type QueryCore = Restrictings Flat (QueryJoin ConfigureQuery) Source
Core query monad type used from flat(not-aggregated) query and aggregated query.
extractCore :: QueryCore a -> ConfigureQuery (((a, QueryRestriction Flat), JoinProduct), Duplication) Source
Extract QueryCore computation.
type OrderedQuery c m p r = Orderings c m (PlaceHolders p, Projection c r) Source
OrderedQuery monad type with placeholder type p. Projection must be the same as Orderings context type parameter c.