[Haskell-cafe] How to store Fixed data type in the database with persistent ?
michael at snoyman.com
Sat Jan 26 18:16:19 CET 2013
Very nice to see, I'm happy to stand corrected here. We'll definitely get
some support for fixed into the next major release.
On Saturday, January 26, 2013, wrote:
> > 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.
> CREATE TABLE t1(val);
> sqlite> insert into t1 values ('24.24242424')
> ...> ;
> sqlite> insert into t1 values ('24.24242423')
> ...> ;
> sqlite> select * from t1 order by val;
> sqlite> select * from t1 order by val desc;
> sqlite> select sum(val) from t1;
> it seems Sqlite can work with arbitrary percission data, very good !
> Persistent must have ability to store Fixed.
> Haskell-Cafe mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe