@@ -16,6 +16,7 @@ Squeal queries.
16 , LambdaCase
16 , LambdaCase
17 , OverloadedStrings
17 , OverloadedStrings
18 , StandaloneDeriving
18 , StandaloneDeriving
19 , TypeInType
20 , TypeInType
20 , TypeOperators
21 , TypeOperators
@@ -23,6 +24,7 @@ Squeal queries.
23module Squeal.PostgreSQL.Query
24module Squeal.PostgreSQL.Query
24 ( -- * Queries
25 ( -- * Queries
25 Query (UnsafeQuery, renderQuery)
26 Query (UnsafeQuery, renderQuery)
27 , unionAll
29 , unionAll
28 , intersect
30 , intersect
@@ -283,6 +285,9 @@ newtype Query
283 deriving (GHC.Generic,Show,Eq,Ord,NFData)
285 deriving (GHC.Generic,Show,Eq,Ord,NFData)
284instance RenderSQL (Query schema params columns) where renderSQL = renderQuery
286instance RenderSQL (Query schema params columns) where renderSQL = renderQuery
288+type family Query' schema x y where
289+ Query' schema x y = Query schema (ParamsFrom x) (ResultFrom y)
286-- | The results of two queries can be combined using the set operation
291-- | The results of two queries can be combined using the set operation
287-- `union`. Duplicate rows are eliminated.
292-- `union`. Duplicate rows are eliminated.