Example usage for java.sql DatabaseMetaData supportsSchemasInTableDefinitions

List of usage examples for java.sql DatabaseMetaData supportsSchemasInTableDefinitions

Introduction

In this page you can find the example usage for java.sql DatabaseMetaData supportsSchemasInTableDefinitions.

Prototype

boolean supportsSchemasInTableDefinitions() throws SQLException;

Source Link

Document

Retrieves whether a schema name can be used in a table definition statement.

Usage

From source file:org.talend.core.model.metadata.builder.database.manager.ExtractManager.java

protected void retrieveTables(DatabaseMetaData dbMetaData, String schema, List<IMetadataTable> medataTables,
        Set<String> availableTableTypes, List<String> tablesToFilter, int... limit) throws SQLException {
    ResultSet rsTables = null;/*w ww . j a v  a  2 s .c o m*/
    if (EMPTY.equals(schema)) {
        schema = null; // if empty, same as null, no schema.
    }
    rsTables = dbMetaData.getTables(null, schema, null, availableTableTypes.toArray(new String[] {}));
    if (rsTables != null) {
        try {
            getMetadataTables(medataTables, rsTables, dbMetaData.supportsSchemasInTableDefinitions(),
                    tablesToFilter, limit);
        } finally {
            rsTables.close();
        }
    }
}