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