#pragma once #include #include #include "data_structures/concurrent/concurrent_map.hpp" // #include "database/db_transaction.hpp" #include "storage/common.hpp" // #include "storage/indexes/index.hpp" // #include "storage/indexes/index_record_collection.hpp" #include "storage/model/properties/property_family.hpp" #include "storage/vertex_accessor.hpp" #include "utils/option.hpp" class DbTransaction; class Vertices { public: using vertices_t = ConcurrentMap; using prop_familys_t = ConcurrentMap>; vertices_t::Accessor access(); Option find(DbTransaction &t, const Id &id); // Creates new Vertex and returns filled Vertex::Accessor. Vertex::Accessor insert(DbTransaction &t); PropertyFamily &property_family_find_or_create(const std::string &name); // prop_familys_t::Accessor property_family_access(); private: vertices_t vertices; // TODO: Because familys wont be removed this could be done with more // efficent // data structure. prop_familys_t prop_familys; AtomicCounter counter; };