Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

860 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

All 26 methods in DatabaseMetaData that return ResultSet are bound to type-safe Java classes.

Documentation

Full documentation lives in the project wiki:

Coordinates

See Maven Central for available versions.

<dependency>
  <groupId>io.github.jinahya</groupId>
  <artifactId>database-metadata-bind</artifactId>
</dependency>

Quick start

try (var connection = dataSource.getConnection()) {
    var context = Context.newInstance(connection);

    // Get all catalogs
    List<Catalog> catalogs = context.getCatalogs();

    // Get all tables (null = don't filter)
    List<Table> tables = context.getTables(null, null, "%", null);

    // Get columns for a specific table
    List<Column> columns = context.getColumns("my_catalog", "my_schema", "my_table", "%");
}

See the wiki for more examples, catalog/schema null handling, and per-driver notes.

About

A library for binding information from java.sql.DatabaseMetadata

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages