hasql-0.20.1: An efficient native PostgreSQL driver

Safe HaskellNone



data Error Source #


BackendError !ByteString !ByteString

An erroneous result received from the DB. The components are:

  • The SQLSTATE code for the error. The SQLSTATE code identifies the type of error that has occurred; it can be used by front-end applications to perform specific operations (such as error handling) in response to a particular database error. For a list of the possible SQLSTATE codes, see Appendix A. This field is not localizable, and is always present.
  • The primary human-readable error message (typically one line). Always present.
DecodingError !Text

Can happen as a result of an incorrect decoder being applied.

TransportError !Text

Problems with the connection.

ProtocolError !Text

An unexpected or broken data packet received from the server. Can happen as a result of the server sending an unsupported message or something interfering in the communication channel. This error type is highly unlikely.


Eq Error Source # 


(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

Show Error Source # 


showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

session :: Connection -> Session result -> IO (Either Error result) Source #

batch :: Connection -> Batch result -> IO (Either Error result) Source #