|Maintainer||Bryan O'Sullivan <email@example.com>|
Result typeclass, for converting a single value in a row
returned by a SQL query into a more useful Haskell representation.
A Haskell numeric type is considered to be compatible with all
MySQL numeric types that are less accurate than it. For instance,
Double type is compatible with the MySQL
because it can represent a
Long exactly. On the other hand, since
Double might lose precision if representing a
two are not considered compatible.
- class Result a where
- data ResultError
A type that may be converted from a SQL type.
Convert a SQL value to a Haskell value.
ResultError if conversion fails.
Exception thrown if conversion from a SQL value to a Haskell value fails.
The SQL and Haskell types are not compatible.
The SQL value could not be parsed, or could not be represented as a valid Haskell value, or an unexpected low-level error occurred (e.g. mismatch between metadata and actual data in a row).