[Haskell-cafe] How to store Fixed data type in the database with persistent ?

ok at cs.otago.ac.nz ok at cs.otago.ac.nz
Sat Jan 26 03:01:01 CET 2013


> By the way, not all databases supported by Persistent have the ability to
> represent NUMERIC with perfect precision. I'm fairly certain the SQLite
> will just cast to 8-byte reals, though it's possible that it will keep the
> data as strings in some circumstances.

According to the documentation, SQLite stores whatever you give it,
paying very little heed to the declared type.  If you get SQLite to
*compare* two numbers, it will at that point *convert* them to doubles
in order to carry out the comparison.  This is quite separate from the
question of what it can store.





More information about the Haskell-Cafe mailing list