Skip to content

jinahya/database-metadata-bind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 metadata = connection.getDatabaseMetaData();
            var context = Context.newInstance(metadata);
            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 \
  -Dit.test=ExternalIT \
  -Durl='<your-jdbc-url>' \
  -Duser='<your-own-user>' \
  -Dpassword='<your-own-password>' \
  clean test-compile failsafe:integration-test

Links

Docker

MariaDB

MySQL

PostgreSQL

SQL Server

About

A library for binding information from java.sql.DatabaseMetadata

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages