RetrieverConnection(final Connection connection, final SchemaRetrievalOptions schemaRetrievalOptions) throws SQLException { this.connection = checkConnection(connection); metaData = connection.getMetaData(); this.schemaRetrievalOptions = requireNonNull(schemaRetrievalOptions, "No database specific overrides provided"); LOGGER.log(Level.CONFIG, new StringFormat("%s", schemaRetrievalOptions)); tableTypes = new TableTypes(connection); LOGGER.log(Level.CONFIG, new StringFormat("Supported table types are <%s>", tableTypes)); javaSqlTypes = new JavaSqlTypes(); }
private void retrieveTablesFromMetadataForAllTables(final NamedObjectList<SchemaReference> schemas, final String tableNamePattern, final Collection<String> tableTypes, final InclusionRuleFilter<Table> tableFilter) throws SQLException { final TableTypes supportedTableTypes = getRetrieverConnection() .getTableTypes(); final String[] filteredTableTypes = supportedTableTypes .filterUnknown(tableTypes); LOGGER.log(Level.FINER, new StringFormat("Retrieving table types <%s>", filteredTableTypes == null? "<<all>>": Arrays .asList(filteredTableTypes))); try (final MetadataResultSet results = new MetadataResultSet(getMetaData() .getTables(null, null, tableNamePattern, filteredTableTypes));) { results.setDescription("retrieveTablesFromMetadataForAllTables"); int numTables = 0; while (results.next()) { numTables = numTables + 1; createTable(results, schemas, tableFilter, supportedTableTypes); } LOGGER.log(Level.INFO, new StringFormat("Processed %d tables", numTables)); } }
for (final String tableTypeString: tableTypeStrings) final Optional<TableType> tableType = lookupTableType(tableTypeString); if (tableType.isPresent())
RetrieverConnection(final Connection connection, final SchemaRetrievalOptions schemaRetrievalOptions) throws SQLException { this.connection = checkConnection(connection); metaData = connection.getMetaData(); this.schemaRetrievalOptions = requireNonNull(schemaRetrievalOptions, "No database specific overrides provided"); LOGGER.log(Level.CONFIG, new StringFormat("%s", schemaRetrievalOptions)); tableTypes = new TableTypes(connection); LOGGER.log(Level.CONFIG, new StringFormat("Supported table types are <%s>", tableTypes)); javaSqlTypes = new JavaSqlTypes(); }
private void retrieveTablesFromMetadataForAllTables(final NamedObjectList<SchemaReference> schemas, final String tableNamePattern, final Collection<String> tableTypes, final InclusionRuleFilter<Table> tableFilter) throws SQLException { final TableTypes supportedTableTypes = getRetrieverConnection() .getTableTypes(); final String[] filteredTableTypes = supportedTableTypes .filterUnknown(tableTypes); LOGGER.log(Level.FINER, new StringFormat("Retrieving table types <%s>", filteredTableTypes == null? "<<all>>": Arrays .asList(filteredTableTypes))); try (final MetadataResultSet results = new MetadataResultSet(getMetaData() .getTables(null, null, tableNamePattern, filteredTableTypes));) { results.setDescription("retrieveTablesFromMetadataForAllTables"); int numTables = 0; while (results.next()) { numTables = numTables + 1; createTable(results, schemas, tableFilter, supportedTableTypes); } LOGGER.log(Level.INFO, new StringFormat("Processed %d tables", numTables)); } }
for (final String tableTypeString: tableTypeStrings) final Optional<TableType> tableType = lookupTableType(tableTypeString); if (tableType.isPresent())
.getQuery(InformationSchemaKey.TABLES); final Connection connection = getDatabaseConnection(); final TableTypes supportedTableTypes = new TableTypes(tableTypes); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(tablesSql,
.getTableTypes(); final String[] filteredTableTypes = supportedTableTypes .filterUnknown(tableTypes); LOGGER.log(Level.FINER, new StringFormat("Retrieving table types <%s>",
.lookupTableType(tableTypeString).orElse(TableType.UNKNOWN); if (tableType.equals(TableType.UNKNOWN))
.getQuery(InformationSchemaKey.TABLES); final Connection connection = getDatabaseConnection(); final TableTypes supportedTableTypes = new TableTypes(tableTypes); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(tablesSql,
.getTableTypes(); final String[] filteredTableTypes = supportedTableTypes .filterUnknown(tableTypes); LOGGER.log(Level.FINER, new StringFormat("Retrieving table types <%s>",
.lookupTableType(tableTypeString).orElse(TableType.UNKNOWN); if (tableType.equals(TableType.UNKNOWN))
RetrieverConnection(final Connection connection, final SchemaRetrievalOptions schemaRetrievalOptions) throws SQLException { this.connection = checkConnection(connection); metaData = connection.getMetaData(); this.schemaRetrievalOptions = requireNonNull(schemaRetrievalOptions, "No database specific overrides provided"); LOGGER.log(Level.CONFIG, new StringFormat("%s", schemaRetrievalOptions)); tableTypes = new TableTypes(connection); LOGGER.log(Level.CONFIG, new StringFormat("Supported table types are <%s>", tableTypes)); javaSqlTypes = new JavaSqlTypes(); }
private void retrieveTablesFromMetadataForAllTables(final NamedObjectList<SchemaReference> schemas, final String tableNamePattern, final Collection<String> tableTypes, final InclusionRuleFilter<Table> tableFilter) throws SQLException { final TableTypes supportedTableTypes = getRetrieverConnection() .getTableTypes(); final String[] filteredTableTypes = supportedTableTypes .filterUnknown(tableTypes); LOGGER.log(Level.FINER, new StringFormat("Retrieving table types <%s>", filteredTableTypes == null? "<<all>>": Arrays .asList(filteredTableTypes))); try (final MetadataResultSet results = new MetadataResultSet(getMetaData() .getTables(null, null, tableNamePattern, filteredTableTypes));) { results.setDescription("retrieveTablesFromMetadataForAllTables"); int numTables = 0; while (results.next()) { numTables = numTables + 1; createTable(results, schemas, tableFilter, supportedTableTypes); } LOGGER.log(Level.INFO, new StringFormat("Processed %d tables", numTables)); } }
for (final String tableTypeString: tableTypeStrings) final Optional<TableType> tableType = lookupTableType(tableTypeString); if (tableType.isPresent())
RetrieverConnection(final Connection connection, final SchemaRetrievalOptions schemaRetrievalOptions) throws SQLException { this.connection = checkConnection(connection); metaData = connection.getMetaData(); this.schemaRetrievalOptions = requireNonNull(schemaRetrievalOptions, "No database specific overrides provided"); LOGGER.log(Level.CONFIG, new StringFormat("%s", schemaRetrievalOptions)); tableTypes = new TableTypes(connection); LOGGER.log(Level.CONFIG, new StringFormat("Supported table types are <%s>", tableTypes)); javaSqlTypes = new JavaSqlTypes(); }
private void retrieveTablesFromMetadataForAllTables(final NamedObjectList<SchemaReference> schemas, final String tableNamePattern, final Collection<String> tableTypes, final InclusionRuleFilter<Table> tableFilter) throws SQLException { final TableTypes supportedTableTypes = getRetrieverConnection() .getTableTypes(); final String[] filteredTableTypes = supportedTableTypes .filterUnknown(tableTypes); LOGGER.log(Level.FINER, new StringFormat("Retrieving table types <%s>", filteredTableTypes == null? "<<all>>": Arrays .asList(filteredTableTypes))); try (final MetadataResultSet results = new MetadataResultSet(getMetaData() .getTables(null, null, tableNamePattern, filteredTableTypes));) { results.setDescription("retrieveTablesFromMetadataForAllTables"); int numTables = 0; while (results.next()) { numTables = numTables + 1; createTable(results, schemas, tableFilter, supportedTableTypes); } LOGGER.log(Level.INFO, new StringFormat("Processed %d tables", numTables)); } }
for (final String tableTypeString: tableTypeStrings) final Optional<TableType> tableType = lookupTableType(tableTypeString); if (tableType.isPresent())
.getQuery(InformationSchemaKey.TABLES); final Connection connection = getDatabaseConnection(); final TableTypes supportedTableTypes = new TableTypes(tableTypes); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(tablesSql,
.getTableTypes(); final String[] filteredTableTypes = supportedTableTypes .filterUnknown(tableTypes); LOGGER.log(Level.FINER, new StringFormat("Retrieving table types <%s>",