@Override public InformationSchemaViews toOptions() { return new InformationSchemaViews(informationSchemaQueries); }
@Override public InformationSchemaViewsBuilder fromOptions(final InformationSchemaViews informationSchemaViews) { if (informationSchemaViews == null) { return this; } informationSchemaQueries .putAll(informationSchemaViews.getInformationSchemaQueries()); return this; }
private void retrieveProcedureColumnsFromDataDictionary(final NamedObjectList<MutableRoutine> allRoutines, final InclusionRuleFilter<ProcedureColumn> columnFilter) throws SQLException { final InformationSchemaViews informationSchemaViews = getRetrieverConnection() .getInformationSchemaViews(); if (!informationSchemaViews .hasQuery(InformationSchemaKey.PROCEDURE_COLUMNS)) { throw new SchemaCrawlerSQLException("No procedure columns SQL provided", null); } final Query procedureColumnsSql = informationSchemaViews .getQuery(InformationSchemaKey.PROCEDURE_COLUMNS); final Connection connection = getDatabaseConnection(); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(procedureColumnsSql, statement, getSchemaInclusionRule());) { results.setDescription("retrieveProcedureColumnsFromDataDictionary"); while (results.next()) { createProcedureColumn(results, allRoutines, columnFilter); } } }
final InformationSchemaViews informationSchemaViews) if (!informationSchemaViews.hasExtTableConstraintsSql()) .getExtTableConstraintsSql();
if (!informationSchemaViews.hasAdditionalTableAttributesSql()) .getAdditionalTableAttributesSql();
if (!informationSchemaViews.hasAdditionalColumnAttributesSql()) .getAdditionalColumnAttributesSql();
.getInformationSchemaViews(); if (!informationSchemaViews.hasExtTablesSql()) .getExtTablesSql();
.getInformationSchemaViews(); if (!informationSchemaViews.hasExtIndexesSql()) .getExtIndexesSql();
private void retrieveFunctionColumnsFromDataDictionary(final NamedObjectList<MutableRoutine> allRoutines, final InclusionRuleFilter<FunctionColumn> columnFilter) throws SQLException { final InformationSchemaViews informationSchemaViews = getRetrieverConnection() .getInformationSchemaViews(); if (!informationSchemaViews.hasQuery(InformationSchemaKey.FUNCTION_COLUMNS)) { throw new SchemaCrawlerSQLException("No function columns SQL provided", null); } final Query functionColumnsSql = informationSchemaViews .getQuery(InformationSchemaKey.FUNCTION_COLUMNS); final Connection connection = getDatabaseConnection(); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(functionColumnsSql, statement, getSchemaInclusionRule());) { results.setDescription("retrieveFunctionColumnsFromDataDictionary"); while (results.next()) { createFunctionColumn(results, allRoutines, columnFilter); } } }
@Override public InformationSchemaViews toOptions() { return new InformationSchemaViews(informationSchemaQueries); }
@Override public InformationSchemaViewsBuilder fromOptions(final InformationSchemaViews informationSchemaViews) { if (informationSchemaViews == null) { return this; } informationSchemaQueries .putAll(informationSchemaViews.getInformationSchemaQueries()); return this; }
private void retrieveFunctionColumnsFromDataDictionary(final NamedObjectList<MutableRoutine> allRoutines, final InclusionRuleFilter<FunctionColumn> columnFilter) throws SQLException { final InformationSchemaViews informationSchemaViews = getRetrieverConnection() .getInformationSchemaViews(); if (!informationSchemaViews.hasQuery(InformationSchemaKey.FUNCTION_COLUMNS)) { throw new SchemaCrawlerSQLException("No function columns SQL provided", null); } final Query functionColumnsSql = informationSchemaViews .getQuery(InformationSchemaKey.FUNCTION_COLUMNS); final Connection connection = getDatabaseConnection(); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(functionColumnsSql, statement, getSchemaInclusionRule());) { results.setDescription("retrieveFunctionColumnsFromDataDictionary"); while (results.next()) { createFunctionColumn(results, allRoutines, columnFilter); } } }
@Override public InformationSchemaViews toOptions() { return new InformationSchemaViews(informationSchemaQueries); }
@Override public InformationSchemaViewsBuilder fromOptions(final InformationSchemaViews informationSchemaViews) { if (informationSchemaViews == null) { return this; } informationSchemaQueries .putAll(informationSchemaViews.getInformationSchemaQueries()); return this; }
private void retrieveTableColumnsFromDataDictionary(final NamedObjectList<MutableTable> allTables, final InclusionRuleFilter<Column> columnFilter, final Set<List<String>> hiddenColumns) throws SQLException { final InformationSchemaViews informationSchemaViews = getRetrieverConnection() .getInformationSchemaViews(); if (!informationSchemaViews.hasQuery(InformationSchemaKey.TABLE_COLUMNS)) { throw new SchemaCrawlerSQLException("No table columns SQL provided", null); } final Query tableColumnsSql = informationSchemaViews .getQuery(InformationSchemaKey.TABLE_COLUMNS); final Connection connection = getDatabaseConnection(); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(tableColumnsSql, statement, getSchemaInclusionRule());) { results.setDescription("retrieveTableColumnsFromDataDictionary"); while (results.next()) { createTableColumn(results, allTables, columnFilter, hiddenColumns); } } }
@Override public InformationSchemaViews toOptions() { return new InformationSchemaViews(informationSchemaQueries); }
@Override public InformationSchemaViewsBuilder fromOptions(final InformationSchemaViews informationSchemaViews) { if (informationSchemaViews == null) { return this; } informationSchemaQueries .putAll(informationSchemaViews.getInformationSchemaQueries()); return this; }
private void retrieveTableColumnsFromDataDictionary(final NamedObjectList<MutableTable> allTables, final InclusionRuleFilter<Column> columnFilter, final Set<List<String>> hiddenColumns) throws SQLException { final InformationSchemaViews informationSchemaViews = getRetrieverConnection() .getInformationSchemaViews(); if (!informationSchemaViews.hasQuery(InformationSchemaKey.TABLE_COLUMNS)) { throw new SchemaCrawlerSQLException("No table columns SQL provided", null); } final Query tableColumnsSql = informationSchemaViews .getQuery(InformationSchemaKey.TABLE_COLUMNS); final Connection connection = getDatabaseConnection(); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(tableColumnsSql, statement, getSchemaInclusionRule());) { results.setDescription("retrieveTableColumnsFromDataDictionary"); while (results.next()) { createTableColumn(results, allTables, columnFilter, hiddenColumns); } } }
/** * Sets the information schema views. * * @param informationSchemaViews * Information schema views. */ public void setInformationSchemaViews(final InformationSchemaViews informationSchemaViews) { if (informationSchemaViews == null) { this.informationSchemaViews = new InformationSchemaViews(); } else { this.informationSchemaViews = informationSchemaViews; } }
private void retrieveProcedureColumnsFromDataDictionary(final NamedObjectList<MutableRoutine> allRoutines, final InclusionRuleFilter<ProcedureColumn> columnFilter) throws SQLException { final InformationSchemaViews informationSchemaViews = getRetrieverConnection() .getInformationSchemaViews(); if (!informationSchemaViews .hasQuery(InformationSchemaKey.PROCEDURE_COLUMNS)) { throw new SchemaCrawlerSQLException("No procedure columns SQL provided", null); } final Query procedureColumnsSql = informationSchemaViews .getQuery(InformationSchemaKey.PROCEDURE_COLUMNS); final Connection connection = getDatabaseConnection(); try (final Statement statement = connection.createStatement(); final MetadataResultSet results = new MetadataResultSet(procedureColumnsSql, statement, getSchemaInclusionRule());) { results.setDescription("retrieveProcedureColumnsFromDataDictionary"); while (results.next()) { createProcedureColumn(results, allRoutines, columnFilter); } } }