/** * Constructor. * * @param conf configuration for connecting to the data store */ public SchemaGenerator(JDBCConfiguration conf) { // note: we cannot assert developer capabilities in this tool like // we normally do because this class is also used at runtime _ds = conf.getDataSource2(null); _log = conf.getLog(JDBCConfiguration.LOG_SCHEMA); // cache this now so that if the conn pool only has 1 connection we // don't conflict later with the open databasemetadata connection _dict = conf.getDBDictionaryInstance(); // create a table of allowed schema and tables to reflect on String[] schemaArray = conf.getSchemasList(); DBIdentifier[] names = new DBIdentifier[schemaArray == null ? 0 : schemaArray.length]; for (int i = 0; i < names.length; i++) { String[] splitName = Normalizer.splitName(schemaArray[i]); if (splitName == null || splitName.length == 0) { continue; } if (splitName.length == 1) { names[i] = DBIdentifier.newSchema(schemaArray[i]); } else { names[i] = QualifiedDBIdentifier.newTable(schemaArray[i]); } } _allowed = parseSchemasList(names); }
/** * Constructor. * * @param conf configuration for connecting to the data store */ public SchemaGenerator(JDBCConfiguration conf) { // note: we cannot assert developer capabilities in this tool like // we normally do because this class is also used at runtime _ds = conf.getDataSource2(null); _log = conf.getLog(JDBCConfiguration.LOG_SCHEMA); // cache this now so that if the conn pool only has 1 connection we // don't conflict later with the open databasemetadata connection _dict = conf.getDBDictionaryInstance(); // create a table of allowed schema and tables to reflect on String[] schemaArray = conf.getSchemasList(); DBIdentifier[] names = new DBIdentifier[schemaArray == null ? 0 : schemaArray.length]; for (int i = 0; i < names.length; i++) { String[] splitName = Normalizer.splitName(schemaArray[i]); if (splitName == null || splitName.length == 0) { continue; } if (splitName.length == 1) { names[i] = DBIdentifier.newSchema(schemaArray[i]); } else { names[i] = QualifiedDBIdentifier.newTable(schemaArray[i]); } } _allowed = parseSchemasList(names); }
/** * Constructor. * * @param conf configuration for connecting to the data store */ public SchemaGenerator(JDBCConfiguration conf) { // note: we cannot assert developer capabilities in this tool like // we normally do because this class is also used at runtime _ds = conf.getDataSource2(null); _log = conf.getLog(JDBCConfiguration.LOG_SCHEMA); // cache this now so that if the conn pool only has 1 connection we // don't conflict later with the open databasemetadata connection _dict = conf.getDBDictionaryInstance(); // create a table of allowed schema and tables to reflect on String[] schemaArray = conf.getSchemasList(); DBIdentifier[] names = new DBIdentifier[schemaArray == null ? 0 : schemaArray.length]; for (int i = 0; i < names.length; i++) { String[] splitName = Normalizer.splitName(schemaArray[i]); if (splitName == null || splitName.length == 0) { continue; } if (splitName.length == 1) { names[i] = DBIdentifier.newSchema(schemaArray[i]); } else { names[i] = QualifiedDBIdentifier.newTable(schemaArray[i]); } } _allowed = parseSchemasList(names); }
/** * Constructor. * * @param conf configuration for connecting to the data store */ public SchemaGenerator(JDBCConfiguration conf) { // note: we cannot assert developer capabilities in this tool like // we normally do because this class is also used at runtime _ds = conf.getDataSource2(null); _log = conf.getLog(JDBCConfiguration.LOG_SCHEMA); // cache this now so that if the conn pool only has 1 connection we // don't conflict later with the open databasemetadata connection _dict = conf.getDBDictionaryInstance(); // create a table of allowed schema and tables to reflect on String[] schemaArray = conf.getSchemasList(); DBIdentifier[] names = new DBIdentifier[schemaArray == null ? 0 : schemaArray.length]; for (int i = 0; i < names.length; i++) { String[] splitName = Normalizer.splitName(schemaArray[i]); if (splitName == null || splitName.length == 0) { continue; } if (splitName.length == 1) { names[i] = DBIdentifier.newSchema(schemaArray[i]); } else { names[i] = QualifiedDBIdentifier.newTable(schemaArray[i]); } } _allowed = parseSchemasList(names); }