@Override public void dropView(ConnectorSession session, SchemaTableName viewName) { try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { delegate.dropView(session, viewName); } }
@Override public void dropView(Session session, QualifiedObjectName viewName) { CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, viewName.getCatalogName()); ConnectorId connectorId = catalogMetadata.getConnectorId(); ConnectorMetadata metadata = catalogMetadata.getMetadata(); metadata.dropView(session.toConnectorSession(connectorId), viewName.asSchemaTableName()); }
@Override public void dropView(Session session, QualifiedObjectName viewName) { CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, viewName.getCatalogName()); ConnectorId connectorId = catalogMetadata.getConnectorId(); ConnectorMetadata metadata = catalogMetadata.getMetadata(); metadata.dropView(session.toConnectorSession(connectorId), viewName.asSchemaTableName()); }
@Test public void testViewCreation() { SchemaTableName temporaryCreateView = temporaryTable("create_view"); try { verifyViewCreation(temporaryCreateView); } finally { try (Transaction transaction = newTransaction()) { ConnectorMetadata metadata = transaction.getMetadata(); metadata.dropView(newSession(), temporaryCreateView); transaction.commit(); } catch (RuntimeException e) { // this usually occurs because the view was not created } } }
@Test public void testViewCreation() { SchemaTableName temporaryCreateView = temporaryTable("create_view"); try { verifyViewCreation(temporaryCreateView); } finally { try (Transaction transaction = newTransaction()) { ConnectorMetadata metadata = transaction.getMetadata(); metadata.dropView(newSession(), temporaryCreateView); transaction.commit(); } catch (RuntimeException e) { // this usually occurs because the view was not created } } }