Closed useronym closed 5 years ago
This is fantastic. Would you be able to add a test to test\TestCases.hs
?
Sure! I'll have a go at it later this week.
I'm going to merge this now - if you have a chance to add tests, please do so.
Yeah sorry, I looked into it during the weekend and realized there's not simple way to run the tests with stack, plus there is some nontrivial setup involved regarding the database.
No worries, thanks for your contribution!
Not sure if this should be merged, but I thought I'd give the option.
The problem is that if someone decides in their database schema to use identifiers (for tables or columns) which are psql-reserved keywords (such as
user
orgroup
), haskelldb will currently fail to generate the proper queries. These identifiers must be quoted with"
. This patch quotes all identifiers to be on the safe side, perhaps it could be adapted to only quote psql-reserved keywords.The second change is to prepend
E
to all string literals, thus enabling proper interpretation of control characters.Credits for this code should go to @chrisdone.