mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-11-25 17:26:28 +03:00
Clean up
This commit is contained in:
parent
30665a331e
commit
cc2c4db3c5
@ -49,26 +49,6 @@ single resultDec =
|
||||
Nothing ->
|
||||
fmap (Left . ClientCommandError) (LibPQ.errorMessage connection)
|
||||
|
||||
-- |
|
||||
-- Fetch a single result.
|
||||
{-# INLINE getResult #-}
|
||||
getResult :: Results LibPQ.Result
|
||||
getResult =
|
||||
Results
|
||||
$ ReaderT
|
||||
$ \(_, connection) -> ExceptT $ do
|
||||
resultMaybe <- LibPQ.getResult connection
|
||||
case resultMaybe of
|
||||
Just result -> pure (Right result)
|
||||
Nothing -> fmap (Left . ClientCommandError) (LibPQ.errorMessage connection)
|
||||
|
||||
-- |
|
||||
-- Fetch a single result.
|
||||
{-# INLINE getResultMaybe #-}
|
||||
getResultMaybe :: Results (Maybe LibPQ.Result)
|
||||
getResultMaybe =
|
||||
Results $ ReaderT $ \(_, connection) -> lift $ LibPQ.getResult connection
|
||||
|
||||
{-# INLINE dropRemainders #-}
|
||||
dropRemainders :: Results ()
|
||||
dropRemainders =
|
||||
|
Loading…
Reference in New Issue
Block a user