From: Volker W. <po...@vo...> - 2004-09-06 20:17:40
|
Hello I've (kind of) fixed the bug which I've reported before. The included patch is for haskelldb-0.8. To apply, do in the HaskellDB top directory: patch -p0 < sql-string-literal-patch I couldn't find a specification of the syntax of string literals in SQL. So I've implemented the syntax which MySQL accepts. Hopefully, it also works with other backends. Most likely, each of the intended backends has its own syntax, and doesn't care about the SQL standard. So the way constants are quoted (ShowConstant class) needs to be made dependent on the database backend (the comment in Query.hs already suggests this). I was partially mistaken about what goes wrong. The real story is that Haskell's show was applied by showConstant to a string constant, quoting it as a Haskell string literal. This was then unsuccessfully undone in PrimQuery.hs, and unsuccessfully requoted as an SQL string literal. The way HaskellDB lets you formulate database queries in a type safe way is great. But from what I've seen, the code appears very hackish, and likely to contain more bugs. I wouldn't advise anybody to entrust his data to it. I think considerable portions of it should be rewritten. Cheers, Volker -- Volker Wysk <po...@vo...> http://www.volker-wysk.de |