Bump opium

This commit is contained in:
Paul Brinkmeier
2025-07-20 02:54:48 +02:00
parent 1a6d2cadad
commit 80f2e52327
6 changed files with 17 additions and 6 deletions
+3 -1
View File
@@ -9,7 +9,7 @@ import qualified Database.PostgreSQL.Opium as Opium
import qualified Yore.DB
main :: IO ()
main = bracket (Opium.connect "host=localhost port=5432 user=yore-test dbname=yore-test") Opium.close $ \conn -> do
main = bracket unsafeConnect Opium.close $ \conn -> do
result <- Yore.DB.getTables conn
case result of
@@ -17,3 +17,5 @@ main = bracket (Opium.connect "host=localhost port=5432 user=yore-test dbname=yo
putStrLn $ "Got error: " ++ show e
Right rows ->
mapM_ print rows
where
unsafeConnect = either (error . show) id <$> Opium.connect "host=localhost port=5432 user=yore-test dbname=yore-test"