[Haskell-cafe] Re: Could someone give me a sample about haskelldb?

2009-06-19 Thread Magicloud Magiclouds
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?
Thanks.

On Fri, Jun 19, 2009 at 1:24 PM, Magicloud
Magicloudsmagicloud.magiclo...@gmail.com wrote:
 Hi,
  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
 --
 竹密岂妨流水过
 山高哪阻野云飞




-- 
竹密岂妨流水过
山高哪阻野云飞
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Could someone give me a sample about haskelldb?

2009-06-19 Thread GüŸnther Schmidt

Hi Magicloud,


restrict (t!T.done .. constant False) should dot it

but your t!T.done confuses me, is the the T.xxx due to an import?
also the line 49 does not seem to be right. Would you mind to post your 
table and column definitions?



Günther


Magicloud Magiclouds schrieb:

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?
Thanks.

On Fri, Jun 19, 2009 at 1:24 PM, Magicloud
Magicloudsmagicloud.magiclo...@gmail.com wrote:

Hi,
 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
--
竹密岂妨流水过
山高哪阻野云飞








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