memgraph/tests/integration/hardcoded_query/delete_all.cpp
Mislav Bradac c56eb4310e Remember token positions for literals
Summary: Remove yaml

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D466
2017-06-13 17:11:27 +02:00

32 lines
776 B
C++

#include <iostream>
#include <string>
#include "query/parameters.hpp"
#include "query/plan_interface.hpp"
#include "query/frontend/stripped.hpp"
#include "query/typed_value.hpp"
#include "using.hpp"
using std::cout;
using std::endl;
using query::TypedValue;
// Query: MATCH (n) DETACH DELETE n
class CPUPlan : public PlanInterface<Stream> {
public:
bool run(GraphDbAccessor &db_accessor, const Parameters &args,
Stream &stream) {
for (auto v : db_accessor.vertices(false)) db_accessor.detach_remove_vertex(v);
std::vector<std::string> headers;
stream.Header(headers);
return true;
}
~CPUPlan() {}
};
extern "C" PlanInterface<Stream> *produce() { return new CPUPlan(); }
extern "C" void destruct(PlanInterface<Stream> *p) { delete p; }