mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-12-28 04:57:14 +03:00
Return ConnectionError
This commit is contained in:
parent
b777ae2e40
commit
032f3be9f5
@ -1,7 +1,7 @@
|
||||
name:
|
||||
hasql
|
||||
version:
|
||||
0.17
|
||||
0.18
|
||||
category:
|
||||
Hasql, Database, PostgreSQL
|
||||
synopsis:
|
||||
|
@ -3,7 +3,7 @@
|
||||
module Hasql.Connection
|
||||
(
|
||||
Connection,
|
||||
AcquisitionError(..),
|
||||
ConnectionError(..),
|
||||
acquire,
|
||||
release,
|
||||
)
|
||||
|
@ -17,12 +17,12 @@ data Connection =
|
||||
|
||||
-- |
|
||||
-- Possible details of the connection acquistion error.
|
||||
type AcquisitionError =
|
||||
type ConnectionError =
|
||||
Maybe ByteString
|
||||
|
||||
-- |
|
||||
-- Acquire a connection using the provided settings encoded according to the PostgreSQL format.
|
||||
acquire :: Settings.Settings -> IO (Either AcquisitionError Connection)
|
||||
acquire :: Settings.Settings -> IO (Either ConnectionError Connection)
|
||||
acquire settings =
|
||||
{-# SCC "acquire" #-}
|
||||
runEitherT $ do
|
||||
|
Loading…
Reference in New Issue
Block a user