Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
A batch of actions to be executed in the context of a database connection.
sql :: ByteString -> Session () Source #
Possibly a multi-statement query, which however cannot be parameterized or prepared, nor can any results of it be collected.
query :: a -> Query a b -> Session b Source #
Parameters and a specification of the parametric query to apply them to.
Execution
An error of some command in the session.
ClientError !(Maybe ByteString) | An error on the client-side, with a message generated by the "libpq" library. Usually indicates problems with connection. |
ResultError !ResultError | Some error with a command result. |
data ResultError Source #
An error with a command result.
ServerError !ByteString !ByteString !(Maybe ByteString) !(Maybe ByteString) | An error reported by the DB. Consists of the following: Code, message, details, hint.
|
UnexpectedResult !Text | The database returned an unexpected result. Indicates an improper statement or a schema mismatch. |
RowError !Int !RowError | An error of the row reader, preceded by the index of the row. |
UnexpectedAmountOfRows !Int | An unexpected amount of rows. |
An error during the decoding of a specific row.
EndOfInput | Appears on the attempt to parse more columns than there are in the result. |
UnexpectedNull | Appears on the attempt to parse a |
ValueError !Text | Appears when a wrong value parser is used. Comes with the error details. |