A quickQuery
could modify the table. I don't think the API analyses the string itself, or checks the database, to see whether or not the table was modified. And HDBC doesn't support autocommit.
You could use withTransaction
, which will automatically handle this detail for you.
EDIT: Try using quickQuery'
, which is the strict version of quickQuery
. In an example on http://book.realworldhaskell.org/read/using-databases.html (scroll down to ch21/query.hs), they didn't need a commit after a plain SELECT statement, but they were using quickQuery'
.