memgraph/tests/integration/hardcoded_query/clique.cpp
Dominik Gleich f6529cd4c3 Clique #1 and #2 works.
Summary:
Merge branch 'dev' into clique_1

Started implementing clique.

Merge branch 'dev' into clique_1

Add multilne query reload.

Clique 1# implementation.

Merge branch 'dev' into clique_1

Clique #1 and #2 implemented.

Add delete all query. Remove unique from clique.

Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan, mislav.bradac, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D73
2017-02-28 12:51:40 +01:00

34 lines
1012 B
C++

#include <algorithm>
#include <bitset>
#include <iostream>
#include <string>
#include "clique.hpp"
#include "query/plan_interface.hpp"
#include "storage/edge_accessor.hpp"
#include "storage/vertex_accessor.hpp"
#include "using.hpp"
#include "utils/assert.hpp"
using std::cout;
using std::endl;
// Query: MATCH
// (a:garment)-[:default_outfit]-(b:garment)-[:default_outfit]-(c:garment)-[:default_outfit]-(d:garment)-[:default_outfit]-(a:garment)-[:default_outfit]-(c:garment),
// (b:garment)-[:default_outfit]-(d:garment) WHERE a.garment_id=1234 RETURN
// a.garment_id,b.garment_id,c.garment_id,d.garment_id
class CPUPlan : public PlanInterface<Stream> {
public:
bool run(GraphDbAccessor &db_accessor, const TypedValueStore<> &args,
Stream &stream) {
return run_general_query(db_accessor, args, stream, CliqueQuery::FIND_ALL);
}
~CPUPlan() {}
};
extern "C" PlanInterface<Stream> *produce() { return new CPUPlan(); }
extern "C" void destruct(PlanInterface<Stream> *p) { delete p; }