use of io.crate.execution.ddl.views.DropViewRequest in project crate by crate.
the class DropViewPlan method executeOrFail.
@Override
public void executeOrFail(DependencyCarrier dependencies, PlannerContext plannerContext, RowConsumer consumer, Row params, SubQueryResults subQueryResults) {
DropViewRequest request = new DropViewRequest(dropView.views(), dropView.ifExists());
Function<DropViewResponse, Row> responseToRow = resp -> {
if (dropView.ifExists() || resp.missing().isEmpty()) {
return new Row1((long) dropView.views().size() - resp.missing().size());
}
throw new RelationsUnknown(resp.missing());
};
dependencies.dropViewAction().execute(request, new OneRowActionListener<>(consumer, responseToRow));
}
Aggregations