A library for binding results of methods defined in DatabaseMetaData.
See Maven Central for available versions.
<dependency>
<groupId>com.github.jinahya</groupId>
<artifactId>database-metadata-bind</artifactId>
</dependency>
All methods, defined in the DatabaseMetaData
, which each returns a ResultSet
, are prepared.
class C {
void m() {
try (var connection = connect()) {
var metadata = connection.getDatabaseMetaData();
var context = Context.newInstance(metadata);
var catalogs = context.getCatalogs();
var tables = context.getTables(null, null, "%", null);
}
}
}
A lot of classes/methods defined in this module need to be tested with various kinds of real databases.
<dependency>
...
<scope>test</scope>
</dependency>
$ mvn \
-Pfailsafe \
-Dit.test=ExternalIT \
-Durl='<your-jdbc-url>' \
-Duser='<your-own-user>' \
-Dpassword='<your-own-password>' \
clean test-compile failsafe:integration-test