#include #include #include "query/backend/cpp/typed_value.hpp" #include "query/plan_interface.hpp" #include "query/stripped.hpp" #include "using.hpp" #include "query/parameters.hpp" using std::cout; using std::endl; // Query: MATCH (n) DETACH DELETE n class CPUPlan : public PlanInterface { public: bool run(GraphDbAccessor &db_accessor, const Parameters &args, Stream &stream) { for (auto v : db_accessor.vertices()) db_accessor.detach_remove_vertex(v); stream.write_empty_fields(); stream.write_meta("rw"); db_accessor.commit(); return true; } ~CPUPlan() {} }; extern "C" PlanInterface *produce() { return new CPUPlan(); } extern "C" void destruct(PlanInterface *p) { delete p; }