From: Marc W. <mar...@gm...> - 2008-05-26 10:33:10
|
> Unfortunatelly, the ghc compiler tells me that neither of boats, bid, > bname, and color are visible. I'm guessing you are missing a simple thing: Haskelldb provides type safety when creating SQL-queries.. but how does it know about your database scheme? Somewhere there is a tool (src/Database/HaskellDB.hs) which can create those missing modules "telling" haskelldb about the db scheme. I've used this in my own project: dbName = "timeTracker" dbInfo = DBInfo dbName (DBOptions False) [ trackedData, summarize, projects ] where trackedData = TInfo "trackedData" [ CInfo "tag" (StringT, False) , CInfo "start" (CalendarTimeT, False) , CInfo "end" (CalendarTimeT, False) ] [..] createDBModules = dbInfoToModuleFiles "." "TimeTrackerDB" dbInfo but there is also dbSpecToDatabase db dbInfo to create the db from spec and I recall there is another method crating the dbInfo from a real database.. Marc Weber |