[Haskell-cafe] Re: Could someone give me a sample about haskelldb?
magicloud.magiclouds at gmail.com
Fri Jun 19 04:32:20 EDT 2009
I changed it, some other problem occured.
1. How to compare a BoolT column to a True? "t!c .<>. True" could not work.
2. What shoud I use after "!"? Like table!col, recordset!col, what is col?
On Fri, Jun 19, 2009 at 1:24 PM, Magicloud
Magiclouds<magicloud.magiclouds at gmail.com> wrote:
> I am learning it following the very few documents on its site. Well,
> I failed, with the import modules, I still cannot compile it. The
> error is on "T.*".
> 6 import Database.HaskellDB.HDBC.SQLite3
> 7 import Database.HaskellDB
> 8 import Database.HaskellDB.DBSpec
> 9 import Database.HaskellDB.DBSpec.PPHelpers
> 10 import Database.HaskellDB.Query
> 48 q = do
> 49 t <- table $ Table "notes" 
> 50 restrict ( t!T.done .<>. False )
> 51 r <- project ( T.subject << t!T.subject )
> 52 order [ desc r T.priority
> 53 , desc r T.dt ]
> 54 return r
More information about the Haskell-Cafe