File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ instance D.Default Constant LT.Text (Column T.PGText) where
5454instance D. Default Constant Int (Column T. PGInt4 ) where
5555 def = Constant T. pgInt4
5656
57+ instance D. Default Constant Int. Int32 (Column T. PGInt4 ) where
58+ def = Constant $ T. pgInt4 . fromIntegral
59+
5760instance D. Default Constant Int. Int64 (Column T. PGInt8 ) where
5861 def = Constant T. pgInt8
5962
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import qualified Data.ByteString.Lazy as LBS
3333import qualified Data.Time as Time
3434import qualified Data.String as String
3535import Data.UUID (UUID )
36- import GHC.Int (Int64 )
36+ import GHC.Int (Int32 , Int64 )
3737
3838-- { Only needed for annoying postgresql-simple patch below
3939
@@ -125,6 +125,9 @@ class QueryRunnerColumnDefault pgType haskellType where
125125instance QueryRunnerColumnDefault T. PGInt4 Int where
126126 queryRunnerColumnDefault = fieldQueryRunnerColumn
127127
128+ instance QueryRunnerColumnDefault T. PGInt4 Int32 where
129+ queryRunnerColumnDefault = fieldQueryRunnerColumn
130+
128131instance QueryRunnerColumnDefault T. PGInt8 Int64 where
129132 queryRunnerColumnDefault = fieldQueryRunnerColumn
130133
You can’t perform that action at this time.
0 commit comments