Add sqlite3 support
Description
Environment
Attachments
- 01 Mar 2012, 07:15 AM
- 18 Feb 2012, 04:06 AM
- 14 Feb 2012, 05:46 AM
Activity

Sean Corfield April 23, 2012 at 9:35 AM
I believe this was fixed in 0.1.3 (at the end of February). As far as I can tell, all of the patch components are applied. Specifically, your transaction test is included in the test suite and passes.

Nelson Morris March 1, 2012 at 7:19 AM
Attached patch that fails with `mvn test`.

Sean Corfield March 1, 2012 at 7:03 AM
The tests pass locally (Mac OS X) and on the Clojure build server (Linux) but you're right that I didn't include the close call on the record set.
I didn't include your additional test which I'm guessing is the key to highlighting the errant behavior for SQLite?
(I couldn't actually apply your patch because I'd spent some time getting all the tests passing for MS SQL Server with both the Microsoft and jTDS drivers)

Nelson Morris March 1, 2012 at 6:57 AM
I still get the transaction issue (part 2 from original description) when clojure.java.jdbc tries to return the generated keys, in a transaction, using sqlite. https://gist.github.com/1947746
I believe this is because the ResultSet from .getGeneratedKeys never gets .close called, so sqlite keeps the db locked and can't rollback. Would you like me to make a new issue?

Sean Corfield March 1, 2012 at 5:33 AM
Integrated parts of the patch. SQLite 3 is now supported. Thanx!
Details
Details
Assignee

Reporter

sqlite3 has some problems:
1) PreparedStatements.addBatch does not do anything without some parameters, so executeBatch doesn't do anything.
2) Transaction support appears to require closing the ResultSet object from generatedKeys.
I've only tested the included patch with the default test dbs and sqlite3.