| 30 | import io.crate.planner.operators.SubQueryResults; |
| 31 | |
| 32 | public class DropServerPlan implements Plan { |
| 33 | |
| 34 | private final AnalyzedDropServer dropServer; |
| 35 | |
| 36 | public DropServerPlan(AnalyzedDropServer dropServer) { |
| 37 | this.dropServer = dropServer; |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | public StatementType type() { |
| 42 | return StatementType.DDL; |
| 43 | } |
| 44 | |
| 45 | @Override |
| 46 | public void executeOrFail(DependencyCarrier dependencies, |
| 47 | PlannerContext plannerContext, |
| 48 | RowConsumer consumer, |
| 49 | Row params, |
| 50 | SubQueryResults subQueryResults) throws Exception { |
| 51 | var request = new DropServerRequest( |
| 52 | dropServer.names(), |
| 53 | dropServer.ifExists(), |
| 54 | dropServer.mode() |
| 55 | ); |
| 56 | dependencies.client() |
| 57 | .execute(TransportDropServer.ACTION, request) |
| 58 | .whenComplete(OneRowActionListener.oneIfAcknowledged(consumer)); |
| 59 | } |
| 60 | } |
nothing calls this directly
no outgoing calls
no test coverage detected