@@ -352,7 +352,7 @@ matchNull y f x = ifThenElse (isNull x) y
352-- `nullIf` gives @NULL@.
352-- `nullIf` gives @NULL@.
354-- >>> :set -XTypeApplications -XDataKinds
354-- >>> :set -XTypeApplications -XDataKinds
355−-- >>> renderExpression @_ @_ @'[_] $ fromNull false (nullIf false (param @1))
355+-- >>> renderExpression @'[] @_ @_ @'[_] $ fromNull false (nullIf false (param @1))
356-- "COALESCE(NULL IF (FALSE, ($1 :: bool)), FALSE)"
356-- "COALESCE(NULL IF (FALSE, ($1 :: bool)), FALSE)"
358 :: Expression schema relations grouping params ('NotNull ty)
358 :: Expression schema relations grouping params ('NotNull ty)
@@ -380,7 +380,7 @@ instance (KnownSymbol label, label `In` labels) => IsPGlabel label
380-- (also called a composite value) using values for its member fields.
380-- (also called a composite value) using values for its member fields.
382-- >>> type Complex = PGcomposite '["real" ::: 'PGfloat8, "imaginary" ::: 'PGfloat8]
382-- >>> type Complex = PGcomposite '["real" ::: 'PGfloat8, "imaginary" ::: 'PGfloat8]
383−-- >>> let i = row (0 `As` #real :* 1 `As` #imaginary :* Nil) :: Expression '[] 'Ungrouped '[] ('NotNull Complex)
383+-- >>> let i = row (0 `As` #real :* 1 `As` #imaginary :* Nil) :: Expression '[] '[] 'Ungrouped '[] ('NotNull Complex)
384-- >>> renderExpression i
384-- >>> renderExpression i
385-- "ROW(0, 1)"
385-- "ROW(0, 1)"
@@ -407,7 +407,7 @@ instance Monoid
407 mempty = array []
407 mempty = array []
408 mappend = (<>)
408 mappend = (<>)
410−-- | >>> renderExpression @_ @_ @'[_] $ greatest currentTimestamp [param @1]
410+-- | >>> renderExpression @'[] @_ @_ @'[_] $ greatest currentTimestamp [param @1]
411-- "GREATEST(CURRENT_TIMESTAMP, ($1 :: timestamp with time zone))"
411-- "GREATEST(CURRENT_TIMESTAMP, ($1 :: timestamp with time zone))"
413 :: Expression schema relations grouping params (nullty)
413 :: Expression schema relations grouping params (nullty)
@@ -870,7 +870,7 @@ unsafeAggregateDistinct fun x = UnsafeExpression $ mconcat
871-- | >>> :{
871-- | >>> :{
873−-- expression :: Expression '[tab ::: '["col" ::: 'Null 'PGnumeric]] ('Grouped bys) params ('Null 'PGnumeric)
873+-- expression :: Expression schema '[tab ::: '["col" ::: 'Null 'PGnumeric]] ('Grouped bys) params ('Null 'PGnumeric)
874-- expression = sum_ #col
874-- expression = sum_ #col
875-- in renderExpression expression
875-- in renderExpression expression
@@ -884,7 +884,7 @@ sum_ = unsafeAggregate "sum"
885-- | >>> :{
885-- | >>> :{
887−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGnumeric]] ('Grouped bys) params (nullity 'PGnumeric)
887+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGnumeric]] ('Grouped bys) params (nullity 'PGnumeric)
888-- expression = sumDistinct #col
888-- expression = sumDistinct #col
889-- in renderExpression expression
889-- in renderExpression expression
@@ -915,7 +915,7 @@ instance PGAvg 'PGinterval 'PGinterval
916-- | >>> :{
916-- | >>> :{
918−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
918+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
919-- expression = bitAnd #col
919-- expression = bitAnd #col
920-- in renderExpression expression
920-- in renderExpression expression
@@ -929,7 +929,7 @@ bitAnd = unsafeAggregate "bit_and"
930-- | >>> :{
930-- | >>> :{
932−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
932+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
933-- expression = bitOr #col
933-- expression = bitOr #col
934-- in renderExpression expression
934-- in renderExpression expression
@@ -943,7 +943,7 @@ bitOr = unsafeAggregate "bit_or"
944-- | >>> :{
944-- | >>> :{
946−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
946+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
947-- expression = bitAndDistinct #col
947-- expression = bitAndDistinct #col
948-- in renderExpression expression
948-- in renderExpression expression
@@ -957,7 +957,7 @@ bitAndDistinct = unsafeAggregateDistinct "bit_and"
958-- | >>> :{
958-- | >>> :{
960−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
960+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGint4]] (Grouped bys) params (nullity 'PGint4)
961-- expression = bitOrDistinct #col
961-- expression = bitOrDistinct #col
962-- in renderExpression expression
962-- in renderExpression expression
@@ -971,7 +971,7 @@ bitOrDistinct = unsafeAggregateDistinct "bit_or"
972-- | >>> :{
972-- | >>> :{
974−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
974+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
975-- expression = boolAnd #col
975-- expression = boolAnd #col
976-- in renderExpression expression
976-- in renderExpression expression
@@ -984,7 +984,7 @@ boolAnd = unsafeAggregate "bool_and"
985-- | >>> :{
985-- | >>> :{
987−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
987+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
988-- expression = boolOr #col
988-- expression = boolOr #col
989-- in renderExpression expression
989-- in renderExpression expression
@@ -997,7 +997,7 @@ boolOr = unsafeAggregate "bool_or"
998-- | >>> :{
998-- | >>> :{
1000−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1000+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1001-- expression = boolAndDistinct #col
1001-- expression = boolAndDistinct #col
1002-- in renderExpression expression
1002-- in renderExpression expression
@@ -1010,7 +1010,7 @@ boolAndDistinct = unsafeAggregateDistinct "bool_and"
1011-- | >>> :{
1011-- | >>> :{
1013−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1013+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1014-- expression = boolOrDistinct #col
1014-- expression = boolOrDistinct #col
1015-- in renderExpression expression
1015-- in renderExpression expression
@@ -1031,7 +1031,7 @@ countStar = UnsafeExpression $ "count(*)"
1032-- | >>> :{
1032-- | >>> :{
1034−-- expression :: Expression '[tab ::: '["col" ::: nullity ty]] (Grouped bys) params ('NotNull 'PGint8)
1034+-- expression :: Expression schema '[tab ::: '["col" ::: nullity ty]] (Grouped bys) params ('NotNull 'PGint8)
1035-- expression = count #col
1035-- expression = count #col
1036-- in renderExpression expression
1036-- in renderExpression expression
@@ -1044,7 +1044,7 @@ count = unsafeAggregate "count"
1045-- | >>> :{
1045-- | >>> :{
1047−-- expression :: Expression '[tab ::: '["col" ::: nullity ty]] (Grouped bys) params ('NotNull 'PGint8)
1047+-- expression :: Expression schema '[tab ::: '["col" ::: nullity ty]] (Grouped bys) params ('NotNull 'PGint8)
1048-- expression = countDistinct #col
1048-- expression = countDistinct #col
1049-- in renderExpression expression
1049-- in renderExpression expression
@@ -1059,7 +1059,7 @@ countDistinct = unsafeAggregateDistinct "count"
1060-- >>> :{
1060-- >>> :{
1062−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1062+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1063-- expression = every #col
1063-- expression = every #col
1064-- in renderExpression expression
1064-- in renderExpression expression
@@ -1074,7 +1074,7 @@ every = unsafeAggregate "every"
1075-- >>> :{
1075-- >>> :{
1077−-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1077+-- expression :: Expression schema '[tab ::: '["col" ::: nullity 'PGbool]] (Grouped bys) params (nullity 'PGbool)
1078-- expression = everyDistinct #col
1078-- expression = everyDistinct #col
1079-- in renderExpression expression
1079-- in renderExpression expression
@@ -1204,7 +1204,7 @@ fixarray p ty = UnsafeTypeExpression $
1204 renderTypeExpression ty <> "[" <> renderNat p <> "]"
1204 renderTypeExpression ty <> "[" <> renderNat p <> "]"
1206-- | `pgtype` is a demoted version of a `PGType`
1206-- | `pgtype` is a demoted version of a `PGType`
1207−class PGTyped schema (ty :: PGType) where pgtype :: TypeExpression schema ty
1207+class PGTyped schema (ty :: PGType) where pgtype :: TypeExpression schema ty
1208instance PGTyped schema 'PGbool where pgtype = bool
1208instance PGTyped schema 'PGbool where pgtype = bool
1209instance PGTyped schema 'PGint2 where pgtype = int2
1209instance PGTyped schema 'PGint2 where pgtype = int2
1210instance PGTyped schema 'PGint4 where pgtype = int4
1210instance PGTyped schema 'PGint4 where pgtype = int4