Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 2.4 KB

README.md

File metadata and controls

71 lines (54 loc) · 2.4 KB

database-metadata-bind

Java CI with Maven Quality Gate Status Maven Central javadoc

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

Links

Docker

MariaDB

MySQL