Skip to content

Commit 168813c

Browse files
committed
Simplify by removing pgty
1 parent 3a1851b commit 168813c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

squeal-postgresql/exe/Example.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ getOrganizations = select_
127127
(from (table (#org ! #organizations `as` #o)))
128128

129129
getOrganizationsBy ::
130-
forall pgty hsty.
131-
NullPG hsty ~ NotNull pgty =>
130+
forall hsty.
131+
(ToPG Schemas hsty) =>
132132
Condition
133133
'Ungrouped
134134
'[]
135135
'[]
136136
Schemas
137-
'[ 'NotNull pgty ]
137+
'[NullPG hsty]
138138
'["o" ::: ["id" ::: NotNull PGint4, "name" ::: NotNull PGtext]] ->
139139
Query_ Schemas (Only hsty) Organization
140140
getOrganizationsBy condition =
@@ -206,12 +206,12 @@ session = do
206206
liftIO $ print (organizationRows :: [Organization])
207207

208208
organizationsResult2 <- runQueryParams
209-
(getOrganizationsBy @'PGint4 @Int32 ((#o ! #id) .== param @1)) (Only (1 :: Int32))
209+
(getOrganizationsBy @Int32 ((#o ! #id) .== param @1)) (Only (1 :: Int32))
210210
organizationRows2 <- getRows organizationsResult2
211211
liftIO $ print (organizationRows2 :: [Organization])
212212

213213
organizationsResult3 <- runQueryParams
214-
(getOrganizationsBy @'PGtext @Text ((#o ! #name) .== param @1)) (Only ("Haskell Foundation" :: Text))
214+
(getOrganizationsBy @Text ((#o ! #name) .== param @1)) (Only ("ACME" :: Text))
215215
organizationRows3 <- getRows organizationsResult3
216216
liftIO $ print (organizationRows3 :: [Organization])
217217

0 commit comments

Comments
 (0)