Rewrite to extend JdbcDriver instead of copying lots of its code