File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 99 , TypeOperators
1010#-}
1111
12+ {-# LANGUAGE ScopedTypeVariables #-}
13+
14+
1215module Main (main , main2 , upsertUser ) where
1316
1417import Control.Monad.IO.Class (MonadIO (.. ))
@@ -124,14 +127,15 @@ getOrganizations = select_
124127 (from (table (# org ! # organizations `as` # o)))
125128
126129getOrganizationsBy ::
130+ forall pgty hsty .
127131 Condition
128132 'Ungrouped
129133 '[]
130134 '[]
131135 Schemas
132- '[ 'NotNull 'PGint4 ]
136+ '[ 'NotNull pgty ]
133137 '[" o" ::: [" id" ::: NotNull PGint4 , " name" ::: NotNull PGtext ]] ->
134- Query_ Schemas (Only Int32 ) Organization
138+ Query_ Schemas (Only hsty ) Organization
135139getOrganizationsBy condition =
136140 select_
137141 (# o ! # id `as` # orgId :* # o ! # name `as` # orgName)
@@ -205,6 +209,11 @@ session = do
205209 organizationRows2 <- getRows organizationsResult2
206210 liftIO $ print (organizationRows2 :: [Organization ])
207211
212+ organizationsResult3 <- runQueryParams
213+ (getOrganizationsBy ((# o ! # name) .== param @ 1 )) (Only (" ACME" :: Text ))
214+ organizationRows3 <- getRows organizationsResult3
215+ liftIO $ print (organizationRows2 :: [Organization ])
216+
208217main :: IO ()
209218main = do
210219 Char8. putStrLn " ===> squeal"
You can’t perform that action at this time.
0 commit comments