public Table( Namespace namespace, Identifier physicalTableName, boolean isAbstract) { this.catalog = namespace.getPhysicalName().getCatalog(); this.schema = namespace.getPhysicalName().getSchema(); this.name = physicalTableName; this.isAbstract = isAbstract; }
public Table(Namespace namespace, Identifier physicalTableName, String subselect, boolean isAbstract) { this.catalog = namespace.getPhysicalName().getCatalog(); this.schema = namespace.getPhysicalName().getSchema(); this.name = physicalTableName; this.subselect = subselect; this.isAbstract = isAbstract; }
public Table(Namespace namespace, String subselect, boolean isAbstract) { this.catalog = namespace.getPhysicalName().getCatalog(); this.schema = namespace.getPhysicalName().getSchema(); this.subselect = subselect; this.isAbstract = isAbstract; }
@Override public NameSpaceTablesInformation getTablesInformation(Namespace namespace) { return extractor.getTables( namespace.getPhysicalName().getCatalog(), namespace.getPhysicalName().getSchema() ); }
public SimpleAuxiliaryDatabaseObject( Namespace namespace, String[] createStrings, String[] dropStrings, Set<String> dialectScopes) { this( dialectScopes, extractName( namespace.getPhysicalName().getCatalog() ), extractName( namespace.getPhysicalName().getSchema() ), createStrings, dropStrings ); }
protected void migrateTable( Table table, TableInformation tableInformation, Dialect dialect, Metadata metadata, Formatter formatter, ExecutionOptions options, GenerationTarget... targets) { final Database database = metadata.getDatabase(); //noinspection unchecked applySqlStrings( false, table.sqlAlterStrings( dialect, metadata, tableInformation, database.getDefaultNamespace().getPhysicalName().getCatalog(), database.getDefaultNamespace().getPhysicalName().getSchema() ), formatter, options, targets ); }
if ( tryToCreateCatalogs ) { final Identifier catalogLogicalName = namespace.getName().getCatalog(); final Identifier catalogPhysicalName = namespace.getPhysicalName().getCatalog(); && namespace.getPhysicalName().getSchema() != null && !existingDatabase.schemaExists( namespace.getName() ) ) { applySqlStrings( false, dialect.getCreateSchemaCommand( namespace.getPhysicalName().getSchema().render( dialect ) ), formatter, options,
if ( database.getDefaultNamespace().getPhysicalName().getSchema() != null ) { params.setProperty( PersistentIdentifierGenerator.SCHEMA, database.getDefaultNamespace().getPhysicalName().getSchema().render( database.getDialect() ) ); if ( database.getDefaultNamespace().getPhysicalName().getCatalog() != null ) { params.setProperty( PersistentIdentifierGenerator.CATALOG, database.getDefaultNamespace().getPhysicalName().getCatalog().render( database.getDialect() ) );
if ( tryToDropSchemas && namespace.getPhysicalName().getSchema() != null ) { applySqlStrings( dialect.getDropSchemaCommand( namespace.getPhysicalName().getSchema().render( dialect ) ), formatter, final Identifier catalogPhysicalName = namespace.getPhysicalName().getCatalog();
private static class AssociationTableNameSource implements ObjectNameSource { private final String explicitName; private final String logicalName; private AssociationTableNameSource(String explicitName, String logicalName) { this.explicitName = explicitName; this.logicalName = logicalName; } public String getExplicitName() { return explicitName; } public String getLogicalName() { return logicalName; } }
final Identifier catalogPhysicalName = namespace.getPhysicalName().getCatalog(); if ( tryToCreateSchemas && namespace.getPhysicalName().getSchema() != null ) { applySqlStrings( dialect.getCreateSchemaCommand( namespace.getPhysicalName().getSchema().render( dialect ) ), formatter, options,
private InformationExtractorJdbcDatabaseMetaDataImplTest buildInformationExtractorJdbcDatabaseMetaDataImplTest() throws SQLException { Database database = metadata.getDatabase(); final ConnectionProvider connectionProvider = ssr.getService( ConnectionProvider.class ); DatabaseInformation dbInfo = new DatabaseInformationImpl( ssr, database.getJdbcEnvironment(), new DdlTransactionIsolatorTestingImpl( ssr, new JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess( connectionProvider ) ), database.getDefaultNamespace().getName() ); ExtractionContextImpl extractionContext = new ExtractionContextImpl( ssr, database.getJdbcEnvironment(), ssr.getService( JdbcServices.class ).getBootstrapJdbcConnectionAccess(), (ExtractionContext.DatabaseObjectAccess) dbInfo, database.getDefaultNamespace().getPhysicalName().getCatalog(), database.getDefaultNamespace().getPhysicalName().getSchema() ); return new InformationExtractorJdbcDatabaseMetaDataImplTest( extractionContext ); }
private DatabaseInformation getDatabaseInformation() { final ServiceRegistry serviceRegistry = metadataImplementor.getMetadataBuildingOptions().getServiceRegistry(); // final ConfigurationService cfgService = serviceRegistry.getService( ConfigurationService.class ); // final SchemaManagementTool schemaManagementTool = serviceRegistry.getService( SchemaManagementTool.class ); // final SchemaMigrator schemaMigrator = schemaManagementTool.getSchemaMigrator( cfgService.getSettings() ); final JdbcServices jdbcServices = serviceRegistry.getService( JdbcServices.class ); final JdbcConnectionAccess jdbcConnectionAccess = jdbcServices.getBootstrapJdbcConnectionAccess(); final DatabaseInformation databaseInformation; try { databaseInformation = new DatabaseInformationImpl( serviceRegistry, serviceRegistry.getService( JdbcEnvironment.class ), jdbcConnectionAccess, metadataImplementor.getDatabase().getDefaultNamespace().getPhysicalName().getCatalog(), metadataImplementor.getDatabase().getDefaultNamespace().getPhysicalName().getSchema() ); } catch (SQLException e) { throw jdbcServices.getSqlExceptionHelper().convert( e, "Error creating DatabaseInformation for schema migration" ); } return databaseInformation; }