mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-11-26 23:33:02 +03:00
Docs
This commit is contained in:
parent
ed23377f2e
commit
05dc480ab9
@ -37,15 +37,21 @@ import qualified Hasql.IO as IO
|
||||
data Connection =
|
||||
Connection !LibPQ.Connection !Bool !PreparedStatementRegistry.PreparedStatementRegistry
|
||||
|
||||
-- |
|
||||
-- An error of the result-decoder.
|
||||
data ResultsError =
|
||||
-- |
|
||||
-- An error on the client-side,
|
||||
-- with a message generated by the \"libpq\" library.
|
||||
-- Usually indicates problems with connection.
|
||||
ClientError !(Maybe ByteString) |
|
||||
-- |
|
||||
-- Decoder error details.
|
||||
ResultError !ResultError
|
||||
deriving (Show, Eq)
|
||||
|
||||
-- |
|
||||
-- Decoder error details.
|
||||
data ResultError =
|
||||
-- |
|
||||
-- An error reported by the DB. Code, message, details, hint.
|
||||
@ -77,14 +83,23 @@ data ResultError =
|
||||
UnexpectedAmountOfRows !Int
|
||||
deriving (Show, Eq)
|
||||
|
||||
-- |
|
||||
-- An error during the decoding of a specific row.
|
||||
data RowError =
|
||||
-- |
|
||||
-- Appears on the attempt to parse more columns than there are in the result.
|
||||
EndOfInput |
|
||||
-- |
|
||||
-- Appears on the attempt to parse a @NULL@ as some value.
|
||||
UnexpectedNull |
|
||||
-- |
|
||||
-- Appears when a wrong value parser is used.
|
||||
-- Comes with the error details.
|
||||
ValueError !Text
|
||||
deriving (Show, Eq)
|
||||
|
||||
-- |
|
||||
-- A connection acquistion error.
|
||||
-- Possible details of the connection acquistion error.
|
||||
type ConnectionError =
|
||||
Maybe ByteString
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user