This commit is contained in:
2024-06-17 12:51:58 +02:00
parent b371cdf725
commit ab9fac6a55
+2 -3
View File
@@ -27,6 +27,7 @@ module Database.PostgreSQL.Opium
) )
where where
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO) import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Except (ExceptT (..), except, runExceptT) import Control.Monad.Trans.Except (ExceptT (..), except, runExceptT)
import Data.Proxy (Proxy (..)) import Data.Proxy (Proxy (..))
@@ -67,9 +68,7 @@ execute
-> Text -> Text
-> a -> a
-> IO (Either Error ()) -> IO (Either Error ())
execute conn query params = runExceptT $ do execute conn query params = runExceptT $ void $ execParams conn query params
_ <- execParams conn query params
pure ()
execute_ :: Connection -> Text -> IO (Either Error ()) execute_ :: Connection -> Text -> IO (Either Error ())
execute_ conn query = execute conn query () execute_ conn query = execute conn query ()