[Haskell-beginners] Sqlite3 - INSERT statement question

Brent Yorgey byorgey at seas.upenn.edu
Thu Feb 3 21:22:49 CET 2011


On Thu, Feb 03, 2011 at 02:09:41PM -0500, Patrick Lynch wrote:
> ...looks good, thank you - see following: [note: the '1' on the 2nd
> line indicates a successful command execution] --
> 
> Prelude Database.HDBC Database.HDBC.Sqlite3> run conn "INSERT INTO
> test VALUES (?, ?)" [toSql (0::Int), toSql ("zero"::[Char])]
> 1

Great. Note that the ::[Char] annotation is not strictly necessary,
since the type of "zero" is unambiguous*.  But of course it can't hurt
anything.

-Brent

* Well, unless you have enabled -XOverloadedStrings...



More information about the Beginners mailing list