@@ -46,7 +46,6 @@ module Squeal.PostgreSQL.Definition
46import Control.Category
46import Control.Category
47import Control.DeepSeq
47import Control.DeepSeq
48import Data.ByteString
48import Data.ByteString
50import Data.Monoid
49import Data.Monoid
51import Generics.SOP
50import Generics.SOP
52import GHC.TypeLits
51import GHC.TypeLits
@@ -66,7 +65,7 @@ newtype Definition
66 (schema0 :: TablesType)
65 (schema0 :: TablesType)
67 (schema1 :: TablesType)
66 (schema1 :: TablesType)
68 = UnsafeDefinition { renderDefinition :: ByteString }
67 = UnsafeDefinition { renderDefinition :: ByteString }
69− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
68+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
71instance Category Definition where
70instance Category Definition where
72 id = UnsafeDefinition ";"
71 id = UnsafeDefinition ";"
@@ -102,7 +101,7 @@ newtype TableConstraint
102 (schema :: TablesType)
101 (schema :: TablesType)
103 (columns :: ColumnsType)
102 (columns :: ColumnsType)
104 = UnsafeTableConstraint { renderTableConstraint :: ByteString }
103 = UnsafeTableConstraint { renderTableConstraint :: ByteString }
105− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
104+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
108 :: Condition '[table ::: columns] 'Ungrouped '[]
107 :: Condition '[table ::: columns] 'Ungrouped '[]
@@ -148,7 +147,7 @@ data OnDelete
148 = OnDeleteNoAction
147 = OnDeleteNoAction
149 | OnDeleteRestrict
148 | OnDeleteRestrict
150 | OnDeleteCascade
149 | OnDeleteCascade
151− deriving (GHC.Generic,Show,Eq,Ord,Data)
150+ deriving (GHC.Generic,Show,Eq,Ord)
152instance NFData OnDelete
151instance NFData OnDelete
154renderOnDelete :: OnDelete -> ByteString
153renderOnDelete :: OnDelete -> ByteString
@@ -161,7 +160,7 @@ data OnUpdate
161 = OnUpdateNoAction
160 = OnUpdateNoAction
162 | OnUpdateRestrict
161 | OnUpdateRestrict
163 | OnUpdateCascade
162 | OnUpdateCascade
164− deriving (GHC.Generic,Show,Eq,Ord,Data)
163+ deriving (GHC.Generic,Show,Eq,Ord)
165instance NFData OnUpdate
164instance NFData OnUpdate
167renderOnUpdate :: OnUpdate -> ByteString
166renderOnUpdate :: OnUpdate -> ByteString
@@ -208,7 +207,7 @@ newtype AlterTable
208 (columns0 :: ColumnsType)
207 (columns0 :: ColumnsType)
209 (columns1 :: ColumnsType) =
208 (columns1 :: ColumnsType) =
210 UnsafeAlterTable {renderAlterTable :: ByteString}
209 UnsafeAlterTable {renderAlterTable :: ByteString}
211− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
210+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
213addColumnDefault
212addColumnDefault
214 :: KnownSymbol column
213 :: KnownSymbol column
@@ -251,7 +250,7 @@ alterColumn column alteration = UnsafeAlterTable $
252newtype AlterColumn (ty0 :: ColumnType) (ty1 :: ColumnType) =
251newtype AlterColumn (ty0 :: ColumnType) (ty1 :: ColumnType) =
253 UnsafeAlterColumn {renderAlterColumn :: ByteString}
252 UnsafeAlterColumn {renderAlterColumn :: ByteString}
254− deriving (GHC.Generic,Show,Eq,Ord,Data,NFData)
253+ deriving (GHC.Generic,Show,Eq,Ord,NFData)
256setDefault
255setDefault
257 :: Expression '[] 'Ungrouped '[] ('Required ty)
256 :: Expression '[] 'Ungrouped '[] ('Required ty)