File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1010#-}
1111
1212{-# LANGUAGE ScopedTypeVariables #-}
13-
13+ {-# LANGUAGE AllowAmbiguousTypes #-}
1414
1515module Main (main , main2 , upsertUser ) where
1616
@@ -128,6 +128,7 @@ getOrganizations = select_
128128
129129getOrganizationsBy ::
130130 forall pgty hsty .
131+ NullPG hsty ~ NotNull pgty =>
131132 Condition
132133 'Ungrouped
133134 '[]
@@ -205,14 +206,14 @@ session = do
205206 liftIO $ print (organizationRows :: [Organization ])
206207
207208 organizationsResult2 <- runQueryParams
208- (getOrganizationsBy ((# o ! # id ) .== param @ 1 )) (Only (1 :: Int32 ))
209+ (getOrganizationsBy @ 'PGint4 @ Int32 ((# o ! # id ) .== param @ 1 )) (Only (1 :: Int32 ))
209210 organizationRows2 <- getRows organizationsResult2
210211 liftIO $ print (organizationRows2 :: [Organization ])
211212
212213 organizationsResult3 <- runQueryParams
213- (getOrganizationsBy ((# o ! # name) .== param @ 1 )) (Only (" ACME " :: Text ))
214+ (getOrganizationsBy @ 'PGtext @ Text ((# o ! # name) .== param @ 1 )) (Only (" Haskell Foundation " :: Text ))
214215 organizationRows3 <- getRows organizationsResult3
215- liftIO $ print (organizationRows2 :: [Organization ])
216+ liftIO $ print (organizationRows3 :: [Organization ])
216217
217218main :: IO ()
218219main = do
You can’t perform that action at this time.
0 commit comments