MCPcopy Create free account
hub / github.com/crate/crate / DropServerPlan

Class DropServerPlan

server/src/main/java/io/crate/planner/DropServerPlan.java:32–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30import io.crate.planner.operators.SubQueryResults;
31
32public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected