Class DbMetaData

java.lang.Object
org.itsallcode.jdbc.metadata.DbMetaData

public class DbMetaData extends Object
A simple wrapper for DatabaseMetaData.
  • Constructor Details

  • Method Details

    • getTables

      public SimpleResultSet<TableMetaData> getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
      Retrieves a description of the tables available in the given catalog. Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM and TABLE_NAME.
      Parameters:
      catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
      schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
      tableNamePattern - a table name pattern; must match the table name as it is stored in the database
      types - a list of table types, which must be from the list of table types returned from DatabaseMetaData.getTableTypes(),to include; null returns all types
      Returns:
      table descriptions
      See Also:
    • getColumns

      public SimpleResultSet<ColumnMetaData> getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
      Retrieves a description of table columns available in the specified catalog.

      Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_CAT,TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.

      Parameters:
      catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
      schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
      tableNamePattern - a table name pattern; must match the table name as it is stored in the database
      columnNamePattern - a column name pattern; must match the column name as it is stored in the database
      Returns:
      column descriptions
      See Also: