Open GoogleCodeExporter opened 9 years ago
Good find. RdbmsSpecifics and all it's subclasses should probably be public,
huh?
Original comment by arthur.b...@gmail.com
on 14 Dec 2012 at 7:56
Or... possibly have the appropriate RdbmsSpecifics configured based on the
driver within the Connection instance passed into the one arg constructor.
// Something like this... not tested ;)
public ConnectionSpy(Connection realConnection)
{
this(realConnection, findRdmsSpecifics(realConnection));
}
...
private static RdbmsSpecifics findRdmsSpecifics(Connection realConnection){
RdbmsSpecifics rdbmsSpecifics = DriverSpy.defaultRdbmsSpecifics;
try {
String driver = realConnection.getMetaData().getDriverName();
if(DriverSpy.rdbmsSpecifics.containsKey(driver)){
rdbmsSpecifics = (RdbmsSpecifics) DriverSpy.rdbmsSpecifics.get(driver);
}
} catch (SQLException e) {
// Log something useful here
}
return rdbmsSpecifics;
}
Original comment by johnrive...@gmail.com
on 14 Dec 2012 at 8:25
I like that idea.
Original comment by arthur.b...@gmail.com
on 14 Dec 2012 at 8:33
Let me know if you are interested in adding any contributors. I'd be more than
happy to make the change and also work on getting this into maven.
Original comment by johnrive...@gmail.com
on 14 Dec 2012 at 8:41
Why don't you work out a patch for your idea, test it and we'll see?
Original comment by arthur.b...@gmail.com
on 15 Dec 2012 at 9:48
Sure
Original comment by johnrive...@gmail.com
on 16 Dec 2012 at 3:51
I worked out the patch and converted the build to maven. Not sure if you
want to switch to maven or not though. Let me know. I'd have to send you
the zip because i would need to be able to commit in order to modify the
directory structure. The maven build is a multimodule build that will build
the jars for both JDBC3 and 4 as well as generate a site, javadoc and
changeset report.
Original comment by johnrive...@gmail.com
on 27 Dec 2012 at 3:40
Original issue reported on code.google.com by
johnrive...@gmail.com
on 14 Dec 2012 at 6:29