public static SchemaRetrievalOptions newSchemaRetrievalOptions(final Config config) { return new SchemaRetrievalOptionsBuilder().fromConfig(config).toOptions(); }
protected SchemaRetrievalOptions(final SchemaRetrievalOptionsBuilder builder) { final SchemaRetrievalOptionsBuilder bldr = builder == null? SchemaRetrievalOptionsBuilder .builder(): builder; dbServerType = bldr.getDatabaseServerType(); supportsSchemas = bldr.isSupportsSchemas(); supportsCatalogs = bldr.isSupportsCatalogs(); tableRetrievalStrategy = bldr.getTableRetrievalStrategy(); tableColumnRetrievalStrategy = bldr.getTableColumnRetrievalStrategy(); pkRetrievalStrategy = bldr.getPrimaryKeyRetrievalStrategy(); indexRetrievalStrategy = bldr.getIndexRetrievalStrategy(); fkRetrievalStrategy = bldr.getForeignKeyRetrievalStrategy(); procedureRetrievalStrategy = bldr.getProcedureRetrievalStrategy(); procedureColumnRetrievalStrategy = bldr .getProcedureColumnRetrievalStrategy(); functionRetrievalStrategy = bldr.getFunctionRetrievalStrategy(); functionColumnRetrievalStrategy = bldr.getFunctionColumnRetrievalStrategy(); identifierQuoteString = bldr.getIdentifierQuoteString(); informationSchemaViews = bldr.getInformationSchemaViews(); identifiers = bldr.getIdentifiers(); typeMap = bldr.getTypeMap(); }
@Override public SchemaRetrievalOptions getSchemaRetrievalOptions() { if (schemaRetrievalOptions == null) { return SchemaRetrievalOptionsBuilder.newSchemaRetrievalOptions(); } else { return schemaRetrievalOptions; } }
public static SchemaRetrievalOptions newSchemaRetrievalOptions() { return new SchemaRetrievalOptionsBuilder().toOptions(); }
public static SchemaRetrievalOptionsBuilder builder(final SchemaRetrievalOptions options) { return new SchemaRetrievalOptionsBuilder().fromOptions(options); }
/** * Gets the complete bundled database specific configuration set, * including the SQL for information schema views. * * @param connection * Database connection */ public SchemaRetrievalOptionsBuilder getSchemaRetrievalOptionsBuilder(final Connection connection) { final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = SchemaRetrievalOptionsBuilder .builder().withDatabaseServerType(dbServerType) .withInformationSchemaViewsForConnection(informationSchemaViewsBuilderForConnection, connection) .fromConnnection(connection); return schemaRetrievalOptionsBuilder; }
@Override public SchemaRetrievalOptions getSchemaRetrievalOptions() { return SchemaRetrievalOptionsBuilder.builder() .withDatabaseServerType(OfflineDatabaseConnector.DB_SERVER_TYPE) .toOptions(); }
@Override public void execute() throws Exception { if (connectionOptions == null) { throw new SchemaCrawlerException("No connection options provided"); } final SchemaCrawlerExecutable executable = new SchemaCrawlerExecutable(command); // Configure executable.setOutputOptions(outputOptions); executable.setSchemaCrawlerOptions(schemaCrawlerOptions); executable.setAdditionalConfiguration(config); try (final Connection connection = connectionOptions.getConnection();) { // Get partially built database specific options, built from the // classpath resources, and then override from config loaded in // from the command-line final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = databaseConnector .getSchemaRetrievalOptionsBuilder(connection); schemaRetrievalOptionsBuilder.fromConfig(config); final SchemaRetrievalOptions schemaRetrievalOptions = schemaRetrievalOptionsBuilder .toOptions(); // Execute the command executable.setConnection(connection); executable.setSchemaRetrievalOptions(schemaRetrievalOptions); executable.execute(); } }
/** * Returns database specific options using an existing SchemaCrawler * database plugin. * * @return SchemaRetrievalOptions * @throws SchemaCrawlerException * On an exception. */ public static SchemaRetrievalOptions matchSchemaRetrievalOptions(final Connection connection) throws SchemaCrawlerException { final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = buildSchemaRetrievalOptions(connection); final SchemaRetrievalOptions schemaRetrievalOptions = schemaRetrievalOptionsBuilder .toOptions(); return schemaRetrievalOptions; }
public static SchemaRetrievalOptionsBuilder builder() { return new SchemaRetrievalOptionsBuilder(); }
/** * Gets the complete bundled database specific configuration set, * including the SQL for information schema views. * * @param connection * Database connection */ public SchemaRetrievalOptionsBuilder getSchemaRetrievalOptionsBuilder(final Connection connection) { final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = SchemaRetrievalOptionsBuilder .builder().withDatabaseServerType(dbServerType) .withInformationSchemaViewsForConnection(informationSchemaViewsBuilderForConnection, connection) .fromConnnection(connection); return schemaRetrievalOptionsBuilder; }
@Override public void execute() throws Exception { if (connectionOptions == null) { throw new SchemaCrawlerException("No connection options provided"); } final SchemaCrawlerExecutable executable = new SchemaCrawlerExecutable(command); // Configure executable.setOutputOptions(outputOptions); executable.setSchemaCrawlerOptions(schemaCrawlerOptions); executable.setAdditionalConfiguration(config); try (final Connection connection = connectionOptions.getConnection();) { // Get partially built database specific options, built from the // classpath resources, and then override from config loaded in // from the command-line final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = databaseConnector .getSchemaRetrievalOptionsBuilder(connection); schemaRetrievalOptionsBuilder.fromConfig(config); final SchemaRetrievalOptions schemaRetrievalOptions = schemaRetrievalOptionsBuilder .toOptions(); // Execute the command executable.setConnection(connection); executable.setSchemaRetrievalOptions(schemaRetrievalOptions); executable.execute(); } }
public static SchemaRetrievalOptions newSchemaRetrievalOptions() { return new SchemaRetrievalOptionsBuilder().toOptions(); }
/** * Returns database specific options using an existing SchemaCrawler * database plugin. * * @return SchemaRetrievalOptions * @throws SchemaCrawlerException * On an exception. */ public static SchemaRetrievalOptions matchSchemaRetrievalOptions(final Connection connection) throws SchemaCrawlerException { final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = buildSchemaRetrievalOptions(connection); final SchemaRetrievalOptions schemaRetrievalOptions = schemaRetrievalOptionsBuilder .toOptions(); return schemaRetrievalOptions; }
public static SchemaRetrievalOptionsBuilder builder(final SchemaRetrievalOptions options) { return new SchemaRetrievalOptionsBuilder().fromOptions(options); }
public static SchemaRetrievalOptionsBuilder builder() { return new SchemaRetrievalOptionsBuilder(); }
protected SchemaRetrievalOptions(final SchemaRetrievalOptionsBuilder builder) { final SchemaRetrievalOptionsBuilder bldr = builder == null? SchemaRetrievalOptionsBuilder .builder(): builder; dbServerType = bldr.getDatabaseServerType(); supportsSchemas = bldr.isSupportsSchemas(); supportsCatalogs = bldr.isSupportsCatalogs(); tableRetrievalStrategy = bldr.getTableRetrievalStrategy(); tableColumnRetrievalStrategy = bldr.getTableColumnRetrievalStrategy(); pkRetrievalStrategy = bldr.getPrimaryKeyRetrievalStrategy(); indexRetrievalStrategy = bldr.getIndexRetrievalStrategy(); fkRetrievalStrategy = bldr.getForeignKeyRetrievalStrategy(); procedureRetrievalStrategy = bldr.getProcedureRetrievalStrategy(); procedureColumnRetrievalStrategy = bldr .getProcedureColumnRetrievalStrategy(); functionRetrievalStrategy = bldr.getFunctionRetrievalStrategy(); functionColumnRetrievalStrategy = bldr.getFunctionColumnRetrievalStrategy(); identifierQuoteString = bldr.getIdentifierQuoteString(); informationSchemaViews = bldr.getInformationSchemaViews(); identifiers = bldr.getIdentifiers(); typeMap = bldr.getTypeMap(); }
public static SchemaRetrievalOptions newSchemaRetrievalOptions(final Config config) { return new SchemaRetrievalOptionsBuilder().fromConfig(config).toOptions(); }
/** * Gets the complete bundled database specific configuration set, * including the SQL for information schema views. * * @param connection * Database connection */ public SchemaRetrievalOptionsBuilder getSchemaRetrievalOptionsBuilder(final Connection connection) { final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = SchemaRetrievalOptionsBuilder .builder().withDatabaseServerType(dbServerType) .withInformationSchemaViewsForConnection(informationSchemaViewsBuilderForConnection, connection) .fromConnnection(connection); return schemaRetrievalOptionsBuilder; }
@Override public void execute() throws Exception { if (connectionOptions == null) { throw new SchemaCrawlerException("No connection options provided"); } final SchemaCrawlerExecutable executable = new SchemaCrawlerExecutable(command); // Configure executable.setOutputOptions(outputOptions); executable.setSchemaCrawlerOptions(schemaCrawlerOptions); executable.setAdditionalConfiguration(config); try (final Connection connection = connectionOptions.getConnection();) { // Get partially built database specific options, built from the // classpath resources, and then override from config loaded in // from the command-line final SchemaRetrievalOptionsBuilder schemaRetrievalOptionsBuilder = databaseConnector .getSchemaRetrievalOptionsBuilder(connection); schemaRetrievalOptionsBuilder.fromConfig(config); final SchemaRetrievalOptions schemaRetrievalOptions = schemaRetrievalOptionsBuilder .toOptions(); // Execute the command executable.setConnection(connection); executable.setSchemaRetrievalOptions(schemaRetrievalOptions); executable.execute(); } }