diff --git a/relational-query/src/Database/Relational/Query/Internal/Sub.hs b/relational-query/src/Database/Relational/Query/Internal/Sub.hs index 477bd537..08ea0199 100644 --- a/relational-query/src/Database/Relational/Query/Internal/Sub.hs +++ b/relational-query/src/Database/Relational/Query/Internal/Sub.hs @@ -62,16 +62,6 @@ data Qualified a = Qualified Qualifier a deriving (Show, Functor, Foldable, Traversable) --- | Projection structure unit with single column width -data ProjectionUnit - = RawColumn ColumnSQL -- ^ used in immediate value or unsafe operations - | SubQueryRef (Qualified Int) -- ^ normalized sub-query reference T with Int index - | Scalar SubQuery -- ^ scalar sub-query - deriving Show - --- | Untyped projection. Forgot record type. -type UntypedProjection = [ProjectionUnit] - -- | node attribute for product. data NodeAttr = Just' | Maybe deriving Show @@ -102,6 +92,16 @@ type ProductBuilder = Node QueryRestrictionBuilder type JoinProduct = Maybe QueryProductTree +-- | Projection structure unit with single column width +data ProjectionUnit + = RawColumn ColumnSQL -- ^ used in immediate value or unsafe operations + | SubQueryRef (Qualified Int) -- ^ normalized sub-query reference T with Int index + | Scalar SubQuery -- ^ scalar sub-query + deriving Show + +-- | Untyped projection. Forgot record type. +type UntypedProjection = [ProjectionUnit] + -- | Phantom typed projection. Projected into Haskell record type 't'. newtype Projection c t = Projection