From: Justin B. <jgb...@gm...> - 2010-11-16 17:41:18
|
2010/11/14 Paul Graphov <gr...@gm...>: > Hello HaskellDB users, > First of all, can anybody point some more or less real world example of > HaskellDB usage, > containing everything from defining tables and queries to actual operations > like selecting > and inserting? This would be very useful because now the only source of > knowledge for me > are API docs (which are hard to use without basic understanding) and old > short pdf file... Unfortunately that is the best out there. You can browse the unit tests in the source code at http://code.haskell.org/haskelldb/test too. > That works but I wonder should I always explicitly specify type when I > select fields > (rec ! uid :: Int) and is it possible to avoid creating dummy type for any > query > like BlogUIdRec? If I omit any of them my program fails to compile. I know I don't have to put signatures on all my queries. Not sure why that isn't working for you. Make sure you are using a newer version of GHC (> 6.10) and that you've enabled all language extensions it might complain about. If you can put together self-contained sample (or post an error message from a real file), maybe I or someone else can give a better answer. Justin |