On 21 February 2012 11:51, Mats Rauhala <mats.rauh...@gmail.com> wrote:
> You mentioned that haskelldb was the first library where you weren't
> forced to break the abstraction. Do you have a solution to a situation
> where you might want to retrieve the last inserted id after an insert?

That's a case where I would consider modifying
haskelldb-hdbc-postgresql, for example, to export an insertReturningId
or whatever, because some other engines don't support returning an ID,
and it wouldn't make sense to return Maybe Int or error for the ones
that don't support it. This way it's well-typed.

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

Reply via email to