@@ -113,10 +113,19 @@ renderAliased
113renderAliased render (expression `As` alias) =
113renderAliased render (expression `As` alias) =
114 render expression <> " AS " <> renderAlias alias
114 render expression <> " AS " <> renderAlias alias
116+class IsTableColumn table column expression where
117+ (!) :: Alias table -> Alias column -> expression
119+instance IsTableColumn table column (Alias table, Alias column) where (!) = (,)
116data NullityType = Null PGType | NotNull PGType
121data NullityType = Null PGType | NotNull PGType
118data ColumnType = Optional NullityType | Required NullityType
123data ColumnType = Optional NullityType | Required NullityType
127+ | Grouped [(Symbol,Symbol)]
120type family BaseType (ty :: ColumnType) where
129type family BaseType (ty :: ColumnType) where
121 BaseType (optionality (nullity pg)) = pg
130 BaseType (optionality (nullity pg)) = pg
@@ -153,11 +162,3 @@ type family Rename alias0 alias1 xs where
153type family Join xs ys where
162type family Join xs ys where
154 Join '[] ys = ys
163 Join '[] ys = ys
155 Join (x ': xs) ys = x ': Join xs ys
164 Join (x ': xs) ys = x ': Join xs ys
159− | Grouped [(Symbol,Symbol)]
161−class IsTableColumn table column expression where
162− (!) :: Alias table -> Alias column -> expression