It's always good to know there's a general Haskell mailing list to ask
questions.  I'm experimenting with the HDBC package in combination with
Sqlite3. 

Here's my example table:

        sqlite> .schema foos
        CREATE TABLE foos (id integer primary key, flag bool,
        comment text);

        sqlite> select * from foos;
        id          flag        comment   
        ----------  ----------  ----------
        1           0           a         
        2           1           b         

Here's my query in ghci:

        Database.HDBC> quickQuery conn "select * from foos;" []
        [[SqlString "1",SqlString "0",SqlString "a"],
        [SqlString "2",SqlString "1",SqlString "b"]]

What strikes me is that all values are represented as SqlStrings,
although the type SqlValue would allow something more succint, e.g.
SqlBool for the flag column.  Is this a general limitation of the Sqlite
backend, or is this by design (Sqlite seems to do typing differently
than I had expected), or is it just that nobody has implemented a better
behavior yet?

Curiously, Malte

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to