#pragma once #include #include "data_structures/concurrent/concurrent_map.hpp" #include "utils/counters/atomic_counter.hpp" #include "utils/option.hpp" #include "storage/model/properties/property_family.hpp" #include "storage/vertex_record.hpp" class DbTransaction; class VertexAccessor; using VertexPropertyFamily = PropertyFamily; template using VertexIndexBase = IndexBase; 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 VertexAccessor. VertexAccessor insert(DbTransaction &t); VertexPropertyFamily & property_family_find_or_create(const std::string &name); private: vertices_t vertices; // TODO: Because families wont be removed this could be done with more // efficent // data structure. prop_familys_t prop_familys; AtomicCounter counter; };