21788d003a
Summary: Dressipi CRUD queries are dummy implemented; Fixes T99 and T131 Test Plan: manual Reviewers: sale Subscribers: buda, sale Maniphest Tasks: T131, T99 Differential Revision: https://memgraph.phacility.com/D9
31 lines
762 B
C++
31 lines
762 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "database/db.hpp"
|
|
#include "query/exception/query_engine.hpp"
|
|
#include "query/exception/plan_execution.hpp"
|
|
#include "query/plan/program.hpp"
|
|
#include "query/util.hpp"
|
|
|
|
// preparations before execution
|
|
// execution
|
|
// postprocess the results
|
|
|
|
template <typename Stream>
|
|
class ProgramExecutor
|
|
{
|
|
public:
|
|
// QueryProgram has to know about the Stream
|
|
// Stream has to be passed in this function for every execution
|
|
auto execute(QueryProgram<Stream> &program, Db &db, Stream &stream)
|
|
{
|
|
try {
|
|
return program.plan->run(db, program.stripped.arguments, stream);
|
|
// TODO: catch more exceptions
|
|
} catch (...) {
|
|
throw PlanExecutionException("");
|
|
}
|
|
}
|
|
};
|