#pragma once #include "storage/type_group_edge.hpp" #include "storage/type_group_vertex.hpp" #include "storage/garbage/garbage.hpp" #include "storage/graph.hpp" #include "transactions/engine.hpp" class Db { public: using sptr = std::shared_ptr; Db(); Db(const std::string &name); Db(const Db &db) = delete; Graph graph; tx::Engine tx_engine; Garbage garbage; std::string &name(); // INDEXES // TG - type group // I - type of function I:const tx::Transaction& -> // std::unique_ptr> // G - type of collection (verrtex/edge) // TODO: Currently only one index at a time can be created. template bool create_index_on_vertex_property_family(const char *name, G &coll, I &create_index); // Removes index IndexHolder. True if there was index to remove. template bool remove_index(IndexHolder &ih); private: std::string name_; };