2016-02-07 03:48:40 +08:00
|
|
|
#pragma once
|
|
|
|
|
2016-08-31 06:23:12 +08:00
|
|
|
#include "communication/communication.hpp"
|
2016-06-06 17:29:52 +08:00
|
|
|
#include "database/db.hpp"
|
2016-08-20 01:40:04 +08:00
|
|
|
#include "database/db_accessor.hpp"
|
2016-11-29 11:08:08 +08:00
|
|
|
#include "query/strip/stripped.hpp"
|
2016-02-07 03:48:40 +08:00
|
|
|
|
2016-08-29 01:50:54 +08:00
|
|
|
template <typename Stream>
|
2016-11-02 23:05:02 +08:00
|
|
|
class IPlanCPU
|
2016-02-07 03:48:40 +08:00
|
|
|
{
|
|
|
|
public:
|
2016-11-02 23:05:02 +08:00
|
|
|
virtual bool run(Db &db, plan_args_t &args, Stream &stream) = 0;
|
|
|
|
virtual ~IPlanCPU() {}
|
2016-02-07 03:48:40 +08:00
|
|
|
};
|
|
|
|
|
2016-08-29 01:50:54 +08:00
|
|
|
template <typename Stream>
|
2016-11-02 23:05:02 +08:00
|
|
|
using produce_t = IPlanCPU<Stream> *(*)();
|
2016-08-29 01:50:54 +08:00
|
|
|
|
|
|
|
template <typename Stream>
|
2016-11-02 23:05:02 +08:00
|
|
|
using destruct_t = void (*)(IPlanCPU<Stream> *);
|