From 2113546b9c68d5d828d24da3c4937b862cca9953 Mon Sep 17 00:00:00 2001 From: Kruno Tomola Fabro Date: Thu, 11 Aug 2016 15:32:58 +0100 Subject: [PATCH] build fixes --- include/storage/edge_accessor.hpp | 2 +- include/{mvcc => storage}/edge_record.hpp | 0 include/storage/edges.hpp | 4 +++- include/storage/model/edge_list.hpp | 1 + include/storage/model/vertex_model.hpp | 2 ++ poc/CMakeLists.txt | 2 ++ src/storage/edges.cpp | 5 +++-- 7 files changed, 12 insertions(+), 4 deletions(-) rename include/{mvcc => storage}/edge_record.hpp (100%) diff --git a/include/storage/edge_accessor.hpp b/include/storage/edge_accessor.hpp index 88b977c91..192ce2884 100644 --- a/include/storage/edge_accessor.hpp +++ b/include/storage/edge_accessor.hpp @@ -1,7 +1,7 @@ #pragma once -#include "mvcc/edge_record.hpp" #include "storage/edge.hpp" +#include "storage/edge_record.hpp" #include "storage/record_accessor.hpp" #include "utils/assert.hpp" #include "utils/reference_wrapper.hpp" diff --git a/include/mvcc/edge_record.hpp b/include/storage/edge_record.hpp similarity index 100% rename from include/mvcc/edge_record.hpp rename to include/storage/edge_record.hpp diff --git a/include/storage/edges.hpp b/include/storage/edges.hpp index 67a51adda..85e2e1cdd 100644 --- a/include/storage/edges.hpp +++ b/include/storage/edges.hpp @@ -1,6 +1,7 @@ #pragma once #include "data_structures/concurrent/concurrent_map.hpp" +#include "mvcc/version_list.hpp" #include "storage/common.hpp" #include "storage/edge_accessor.hpp" @@ -8,7 +9,8 @@ class Edges { public: Edge::Accessor find(tx::Transaction &t, const Id &id); - Edge::Accessor insert(tx::Transaction &t); + Edge::Accessor insert(tx::Transaction &t, VertexRecord *from, + VertexRecord *to); private: ConcurrentMap edges; diff --git a/include/storage/model/edge_list.hpp b/include/storage/model/edge_list.hpp index 87c1e0f12..ac53ab4db 100644 --- a/include/storage/model/edge_list.hpp +++ b/include/storage/model/edge_list.hpp @@ -3,6 +3,7 @@ #include #include "mvcc/version_list.hpp" +#include "storage/edge_record.hpp" class EdgeList { diff --git a/include/storage/model/vertex_model.hpp b/include/storage/model/vertex_model.hpp index a5e794466..9293d0c51 100644 --- a/include/storage/model/vertex_model.hpp +++ b/include/storage/model/vertex_model.hpp @@ -1,6 +1,8 @@ #pragma once +#include "storage/label/label_collection.hpp" #include "storage/model/edge_list.hpp" +#include "storage/model/edge_map.hpp" #include "storage/model/property_model.hpp" class VertexModel : public PropertyModel diff --git a/poc/CMakeLists.txt b/poc/CMakeLists.txt index f7741ff2f..29aa3cb8b 100644 --- a/poc/CMakeLists.txt +++ b/poc/CMakeLists.txt @@ -4,3 +4,5 @@ project(memgraph_poc) add_executable(poc_astar astar.cpp) target_link_libraries(poc_astar memgraph) +target_link_libraries(poc_astar Threads::Threads) +target_link_libraries(poc_astar ${fmt_static_lib}) diff --git a/src/storage/edges.cpp b/src/storage/edges.cpp index a0e0d9bbc..22a3d4810 100644 --- a/src/storage/edges.cpp +++ b/src/storage/edges.cpp @@ -15,13 +15,14 @@ Edge::Accessor Edges::find(tx::Transaction &t, const Id &id) return Edge::Accessor(edge, &edges_iterator->second, this); } -Edge::Accessor Edges::insert(tx::Transaction &t) +Edge::Accessor Edges::insert(tx::Transaction &t, VertexRecord *from, + VertexRecord *to) { // get next vertex id auto next = counter.next(std::memory_order_acquire); // create new vertex record - EdgeRecord edge_record(next); + EdgeRecord edge_record(next, from, to); // insert the new vertex record into the vertex store auto edges_accessor = edges.access();