2015-12-08 04:51:55 +08:00
|
|
|
#pragma once
|
2015-10-08 06:58:29 +08:00
|
|
|
|
2015-10-12 02:59:27 +08:00
|
|
|
#include "storage/graph.hpp"
|
|
|
|
#include "transactions/engine.hpp"
|
2015-10-08 06:58:29 +08:00
|
|
|
|
|
|
|
class Db
|
|
|
|
{
|
|
|
|
public:
|
2015-10-12 02:59:27 +08:00
|
|
|
using sptr = std::shared_ptr<Db>;
|
2015-10-08 06:58:29 +08:00
|
|
|
|
2016-08-13 06:01:39 +08:00
|
|
|
Db();
|
|
|
|
Db(const std::string &name);
|
|
|
|
Db(const Db &db) = delete;
|
2016-08-10 16:39:02 +08:00
|
|
|
|
2015-10-12 02:59:27 +08:00
|
|
|
Graph graph;
|
|
|
|
tx::Engine tx_engine;
|
2016-02-07 03:48:40 +08:00
|
|
|
|
2016-08-13 06:01:39 +08:00
|
|
|
std::string &name();
|
2016-08-10 16:39:02 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string name_;
|
2015-10-08 06:58:29 +08:00
|
|
|
};
|