From: Justin B. <jgb...@gm...> - 2009-11-14 20:29:40
|
On Sat, Nov 14, 2009 at 11:55 AM, R. Emre Başar <re...@cs...> wrote: > Or, to take an alternative approach, is it possible to define that type > of query as a HaskellDB table? > Probably that is your best approach. It will be tricky. The haskelldb-th project might help - it has some utilities for defining tables, etc. > Justin Bailey der ki: >> If you look at your specific database and see how to get the primary >> key back out, maybe you can run those statements within a transaction >> and get the result back (HaskellDB.Database.transaction). You may have >> more luck looking at the underlying driver (e.g., HDBC). >> >> 2009/11/14 R. Emre Başar <re...@cs...>: >> > Hi all, >> > >> > I'm developing a HaskellDB application using a console interface (with >> > HCL library). At some points, I have menus represented to the user. User >> > either selects an item from the menu (then I return the value for that >> > item) or add a new item using the "Add" option. When user adds the new >> > item, I need to be able to get a referece back to the newly inserted >> > item to use the unique id of that item throughout other parts of my >> > program. >> > >> > Is there a way to get back the value of the latest insertion? >> > >> > -- >> > R. Emre Başar >> > İstanbul Bilgi University >> > Department of Computer Science >> > > > -- > R. Emre Başar > İstanbul Bilgi University > Department of Computer Science > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iD8DBQFK/wsq86wLPNcWbrwRAoxRAJ9BC7Fq1zW3uEfjUpS/64Lz3dQMRACeMV5h > RxcOpYwmpuaDdDyu7ui3IP4= > =BMdT > -----END PGP SIGNATURE----- > > |