@@ -98,12 +98,11 @@ module Squeal.PostgreSQL.Schema
98 , AllNotNull
98 , AllNotNull
99 , NotAllNull
99 , NotAllNull
100 , NullifyType
100 , NullifyType
101− , NullifyRelation
101+ , NullifyRow
102− , NullifyRelations
102+ , NullifyFrom
103 , ColumnsToRow
103 , ColumnsToRow
104 , TableToColumns
104 , TableToColumns
105 , TableToRow
105 , TableToRow
106− , RelationToNullityTypes
107 , ConstraintInvolves
106 , ConstraintInvolves
108 , DropIfConstraintsInvolve
107 , DropIfConstraintsInvolve
109 -- ** JSON support
108 -- ** JSON support
@@ -564,29 +563,24 @@ type family NotAllNull (columns :: ColumnsType) :: Constraint where
564 NotAllNull (column ::: def :=> 'NotNull ty ': columns) = ()
563 NotAllNull (column ::: def :=> 'NotNull ty ': columns) = ()
565 NotAllNull (column ::: def :=> 'Null ty ': columns) = NotAllNull columns
564 NotAllNull (column ::: def :=> 'Null ty ': columns) = NotAllNull columns
567−-- | `NullifyType` is an idempotent that nullifies a `ColumnType`.
566+-- | `NullifyType` is an idempotent that nullifies a `NullityType`.
568type family NullifyType (ty :: NullityType) :: NullityType where
567type family NullifyType (ty :: NullityType) :: NullityType where
569 NullifyType ('Null ty) = 'Null ty
568 NullifyType ('Null ty) = 'Null ty
570 NullifyType ('NotNull ty) = 'Null ty
569 NullifyType ('NotNull ty) = 'Null ty
572−-- | `NullifyRelation` is an idempotent that nullifies a `ColumnsType`.
571+-- | `NullifyRow` is an idempotent that nullifies a `RowType`.
573−type family NullifyRelation (columns :: RowType) :: RowType where
572+type family NullifyRow (columns :: RowType) :: RowType where
574− NullifyRelation '[] = '[]
573+ NullifyRow '[] = '[]
575− NullifyRelation (column ::: ty ': columns) =
574+ NullifyRow (column ::: ty ': columns) =
576− column ::: NullifyType ty ': NullifyRelation columns
575+ column ::: NullifyType ty ': NullifyRow columns
578−-- | `NullifyRelations` is an idempotent that nullifies a `FromType`
577+-- | `NullifyFrom` is an idempotent that nullifies a `FromType`
579-- used to nullify the left or right hand side of an outer join
578-- used to nullify the left or right hand side of an outer join
580-- in a `Squeal.PostgreSQL.Query.FromClause`.
579-- in a `Squeal.PostgreSQL.Query.FromClause`.
581−type family NullifyRelations (tables :: FromType) :: FromType where
580+type family NullifyFrom (tables :: FromType) :: FromType where
582− NullifyRelations '[] = '[]
581+ NullifyFrom '[] = '[]
583− NullifyRelations (table ::: columns ': tables) =
582+ NullifyFrom (table ::: columns ': tables) =
584− table ::: NullifyRelation columns ': NullifyRelations tables
583+ table ::: NullifyRow columns ': NullifyFrom tables
586−-- | `RelationToNullityTypes` drops the column constraints.
587−type family RelationToNullityTypes (rel :: RowType) :: [NullityType] where
588− RelationToNullityTypes ('(k, x) : xs) = x : RelationToNullityTypes xs
589− RelationToNullityTypes '[] = '[]
591-- | `Join` is simply promoted `++` and is used in @JOIN@s in
585-- | `Join` is simply promoted `++` and is used in @JOIN@s in
592-- `Squeal.PostgreSQL.Query.FromClause`s.
586-- `Squeal.PostgreSQL.Query.FromClause`s.