/** * Obtain a collection of tables types for a database system, as * returned by the database server itself. */ public TableTypes(final Connection connection) { requireNonNull(connection, "No connection provided"); tableTypes = new HashSet<>(); try (final ResultSet tableTypesResults = connection.getMetaData() .getTableTypes();) { final List<String> tableTypeStrings = readResultsVector(tableTypesResults); for (final String tableTypeString: tableTypeStrings) { if (!isBlank(tableTypeString)) { tableTypes.add(new TableType(tableTypeString)); } } } catch (final Exception e) { LOGGER .log(Level.WARNING, "Could not obtain table types from connection", e); } }
/** * Obtain a collection of tables types for a database system, as * returned by the database server itself. */ public TableTypes(final Connection connection) { requireNonNull(connection, "No connection provided"); tableTypes = new HashSet<>(); try (final ResultSet tableTypesResults = connection.getMetaData() .getTableTypes();) { final List<String> tableTypeStrings = readResultsVector(tableTypesResults); for (final String tableTypeString: tableTypeStrings) { if (!isBlank(tableTypeString)) { tableTypes.add(new TableType(tableTypeString)); } } } catch (final Exception e) { LOGGER .log(Level.WARNING, "Could not obtain table types from connection", e); } }
.readResultsVector(results); dbProperties.add(new ImmutableDatabaseProperty(method .getName(), resultsList.toArray(new String[resultsList.size()])));
.readResultsVector(getMetaData().getCatalogs()); for (final String catalogName: metaDataCatalogNames)
.readResultsVector(getMetaData().getCatalogs()); for (final String catalogName: metaDataCatalogNames)
.readResultsVector(results); dbProperties.add(new ImmutableDatabaseProperty(method .getName(), resultsList.toArray(new String[resultsList.size()])));
/** * Obtain a collection of tables types for a database system, as * returned by the database server itself. */ public TableTypes(final Connection connection) { requireNonNull(connection, "No connection provided"); tableTypes = new HashSet<>(); try (final ResultSet tableTypesResults = connection.getMetaData() .getTableTypes();) { final List<String> tableTypeStrings = readResultsVector(tableTypesResults); for (final String tableTypeString: tableTypeStrings) { if (!isBlank(tableTypeString)) { tableTypes.add(new TableType(tableTypeString)); } } } catch (final Exception e) { LOGGER .log(Level.WARNING, "Could not obtain table types from connection", e); } }
/** * Obtain a collection of tables types for a database system, as * returned by the database server itself. */ public TableTypes(final Connection connection) { requireNonNull(connection, "No connection provided"); tableTypes = new HashSet<>(); try (final ResultSet tableTypesResults = connection.getMetaData() .getTableTypes();) { final List<String> tableTypeStrings = readResultsVector(tableTypesResults); for (final String tableTypeString: tableTypeStrings) { if (!isBlank(tableTypeString)) { tableTypes.add(new TableType(tableTypeString)); } } } catch (final Exception e) { LOGGER .log(Level.WARNING, "Could not obtain table types from connection", e); } }
.readResultsVector(getMetaData().getCatalogs()); for (final String catalogName: metaDataCatalogNames)
.readResultsVector(getMetaData().getCatalogs()); for (final String catalogName: metaDataCatalogNames)
.readResultsVector(results); dbProperties.add(new ImmutableDatabaseProperty(method .getName(), resultsList.toArray(new String[resultsList.size()])));
.readResultsVector(results); dbProperties.add(new ImmutableDatabaseProperty(method .getName(), resultsList.toArray(new String[resultsList.size()])));