本文整理了Java中com.facebook.presto.metadata.Metadata.dropView()
方法的一些代码示例,展示了Metadata.dropView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Metadata.dropView()
方法的具体详情如下:
包路径:com.facebook.presto.metadata.Metadata
类名称:Metadata
方法名:dropView
[英]Drops the specified view.
[中]删除指定的视图。
代码示例来源:origin: prestodb/presto
@Override
public ListenableFuture<?> execute(DropView statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)
{
Session session = stateMachine.getSession();
QualifiedObjectName name = createQualifiedObjectName(session, statement, statement.getName());
Optional<ViewDefinition> view = metadata.getView(session, name);
if (!view.isPresent()) {
if (!statement.isExists()) {
throw new SemanticException(MISSING_TABLE, statement, "View '%s' does not exist", name);
}
return immediateFuture(null);
}
accessControl.checkCanDropView(session.getRequiredTransactionId(), session.getIdentity(), name);
metadata.dropView(session, name);
return immediateFuture(null);
}
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
@Override
public CompletableFuture<?> execute(DropView statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine)
{
Session session = stateMachine.getSession();
QualifiedObjectName name = createQualifiedObjectName(session, statement, statement.getName());
Optional<ViewDefinition> view = metadata.getView(session, name);
if (!view.isPresent()) {
if (!statement.isExists()) {
throw new SemanticException(MISSING_TABLE, statement, "View '%s' does not exist", name);
}
return completedFuture(null);
}
accessControl.checkCanDropView(session.getRequiredTransactionId(), session.getIdentity(), name);
metadata.dropView(session, name);
return completedFuture(null);
}
}
内容来源于网络,如有侵权,请联系作者删除!