Add errors and optional fields

This commit is contained in:
2023-09-04 23:46:51 +02:00
parent 8c8740e4b8
commit 7a14714cf6
7 changed files with 165 additions and 55 deletions
@@ -32,8 +32,8 @@ instance FromRow SingleString where
shouldFetch :: (Eq a, FromRow a, Show a) => Connection -> ByteString -> [a] -> IO ()
shouldFetch conn query expectedRows = do
Just actualRows <- Opium.fetch_ conn query
actualRows `shouldBe` expectedRows
actualRows <- Opium.fetch_ conn query
actualRows `shouldBe` Right expectedRows
spec :: SpecWith Connection
spec = do