paul-rouse / mysql-simple

A mid-level client library for the MySQL database, intended to be fast and easy to use.
Other
91 stars 35 forks source link

(At least some) MySQL INT types are not representable as Haskell Int or Integer #26

Open crosser opened 8 years ago

crosser commented 8 years ago

If I

create table coldcnt (timestamp datetime, value int);

then the value field is only representable as Double, Float or Rational. This is counterintuitive and probably wrong (i.e. may lead to wrong result). Internally, value field becomes int(11). Regardless of the number of digits, an integer SQL field ought to be representable as Integer haskell type, even if it is not representable as Int type.