From 6b12edbd8c384ce3e9fc590b16359b77bec7a9ca Mon Sep 17 00:00:00 2001 From: belevy Date: Sat, 13 Feb 2021 19:59:21 -0600 Subject: [PATCH] fix postgres tests --- test/PostgreSQL/Test.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/PostgreSQL/Test.hs b/test/PostgreSQL/Test.hs index 249a828..b493225 100644 --- a/test/PostgreSQL/Test.hs +++ b/test/PostgreSQL/Test.hs @@ -1053,12 +1053,12 @@ testInsertSelectWithConflict = from $ \p -> return $ OneUnique <# val "test" <&> (p ^. PersonFavNum) ) (\current excluded -> []) - uniques1 <- select $ from $ \u -> return u + uniques1 <- select $ Experimental.from $ table @OneUnique n2 <- EP.insertSelectWithConflictCount UniqueValue ( from $ \p -> return $ OneUnique <# val "test" <&> (p ^. PersonFavNum) ) (\current excluded -> []) - uniques2 <- select $ from $ \u -> return u + uniques2 <- select $ Experimental.from $ table @OneUnique liftIO $ n1 `shouldBe` 3 liftIO $ n2 `shouldBe` 0 let test = map (OneUnique "test" . personFavNum) [p1,p2,p3] @@ -1073,7 +1073,7 @@ testInsertSelectWithConflict = from $ \p -> return $ OneUnique <# val "test" <&> (p ^. PersonFavNum) ) (\current excluded -> [OneUniqueValue =. val 4 +. (current ^. OneUniqueValue) +. (excluded ^. OneUniqueValue)]) - uniques1 <- select $ from $ \u -> return u + uniques1 <- select $ Experimental.from $ table @OneUnique n2 <- EP.insertSelectWithConflictCount UniqueValue ( from $ \p -> return $ OneUnique <# val "test" <&> (p ^. PersonFavNum) ) @@ -1255,7 +1255,7 @@ testLateralQuery = do run $ do res <- select $ do l :& c <- Experimental.from $ table @Lord - `leftJoinLateral` (\lord -> do + `LeftOuterJoin` (\lord -> do deed <- Experimental.from $ table @Deed where_ $ lord ^. LordId ==. deed ^. DeedOwnerId pure $ countRows @Int)