#pragma once #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/vertex_accessor.hpp" #include "utils/option.hpp" class Vertices { public: using vertices_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); void update_label_index(const Label &label, VertexIndexRecord &&index_record); VertexIndexRecordCollection &find_label_index(const Label &label); private: vertices_t vertices; Index label_index; AtomicCounter counter; };