2017-03-04

Longevity now has Better Support for Alternative JDBC Back Ends

Longevity release 0.21 features a new back end called JDBC. It should work in a lot of situations where using SQLite back end with a non-SQLite driver would fail. There is also a much easier development path for creating your own back end, should the generic JDBC back end not be sufficient.

In the show notes for the SQLite release, I suggested that people could probably use this back end with other JDBC drivers, since it was mostly vanilla JDBC. But in the back of my mind, I sensed there might be some problems with this. There are a couple of places where org.sqlite.SQLiteException is caught. While these might never get hit, I've since realized that the mere reference to SQLiteException in these classes is going to cause a linking problem that will result in a runtime exception when the SQLite library is not included.

To address this problems, I've created a pure JDBC back end that does not reference any classes from the SQLite dependency. People should be able to have much better luck with this one with an alternative JDBC driver. It also opens up a much clearer development path for someone who, if something goes wrong with the generic driver, wants to create a back end specific to their database. In fact, I've written up a quick guide on how to create your own JDBC-based back end. Some of this advice will be helpful for writers of non-JDBC back ends as well.

The generic JDBC back end has limited support, as I am entirely unable to write tests for it without specifying a real driver. I am also currently supporting 4 other back ends if I include the in-memory back end, and it's simply more than I can handle to take on another at this point. I would be so grateful if someone could step up and create and maintain another back end, or simply to take on the maintenance of an existing back end, so I could free up some time to get on to some of other really important features. Please see the How You Can Contribute page to get some ideas on how you can help. Some of the ideas here are super easy. I could really use the help, I am swamped! Thanks ahead of time.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.