memgraph/src/query_engine/program_executor.hpp

29 lines
488 B
C++
Raw Normal View History

#pragma once
#include <string>
#include "query_program.hpp"
#include "database/db.hpp"
#include "utils/log/logger.hpp"
2016-02-26 14:45:43 +08:00
#include "query_engine/debug.hpp"
// preparations before execution
// execution
// postprocess the results
class ProgramExecutor
{
public:
auto execute(QueryProgram& program)
{
auto result = program.code->run(db, program.stripped.arguments);
2016-02-26 14:45:43 +08:00
PRINT_PROPS(*result->data["n"]->data[0]);
return result;
}
public:
Db db;
};