From 813d37e939ed87201f7e07f13ae986471cf17953 Mon Sep 17 00:00:00 2001 From: florijan Date: Tue, 16 Jan 2018 10:09:15 +0100 Subject: [PATCH] Migrate db::types to storage:: Reviewers: teon.banek, dgleich Reviewed By: teon.banek, dgleich Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D1110 --- src/database/graph_db.cpp | 50 +++++++-------- src/database/graph_db.hpp | 8 +-- src/database/graph_db_accessor.cpp | 38 ++++++------ src/database/graph_db_accessor.hpp | 42 ++++++------- src/database/indexes/key_index.hpp | 6 +- src/database/indexes/label_property_index.hpp | 13 ++-- src/database/storage.hpp | 4 +- src/distributed/serialization.hpp | 16 ++--- src/durability/wal.hpp | 2 +- src/query/frontend/ast/ast.hpp | 61 +++++++++---------- .../frontend/ast/cypher_main_visitor.cpp | 30 ++++----- .../frontend/ast/cypher_main_visitor.hpp | 8 +-- src/query/plan/operator.cpp | 20 +++--- src/query/plan/operator.hpp | 46 +++++++------- src/query/plan/preprocess.cpp | 8 +-- src/query/plan/preprocess.hpp | 15 +++-- src/query/plan/rule_based_planner.hpp | 6 +- src/query/plan/vertex_count_cache.hpp | 25 ++++---- src/storage/concurrent_id_mapper.hpp | 2 +- src/storage/concurrent_id_mapper_master.cpp | 4 +- .../concurrent_id_mapper_rpc_messages.hpp | 6 +- src/storage/concurrent_id_mapper_worker.cpp | 4 +- src/storage/edge.hpp | 6 +- src/storage/edge_accessor.cpp | 2 +- src/storage/edge_accessor.hpp | 6 +- src/storage/edges.hpp | 12 ++-- src/storage/property_value_store.hpp | 4 +- src/storage/record_accessor.cpp | 10 +-- src/storage/record_accessor.hpp | 8 +-- src/{database => storage}/types.hpp | 15 +++-- src/storage/vertex.hpp | 4 +- src/storage/vertex_accessor.cpp | 8 +-- src/storage/vertex_accessor.hpp | 16 ++--- src/utils/random_graph_generator.hpp | 4 +- tests/benchmark/query/planner.cpp | 12 ++-- tests/manual/query_planner.cpp | 15 +++-- .../unit/concurrent_id_mapper_distributed.cpp | 19 +++--- .../unit/concurrent_id_mapper_single_node.cpp | 4 +- tests/unit/cypher_main_visitor.cpp | 4 +- tests/unit/database_key_index.cpp | 8 +-- tests/unit/database_label_property_index.cpp | 10 +-- tests/unit/distributed_serialization.cpp | 4 +- tests/unit/graph_db.cpp | 2 +- tests/unit/graph_db_accessor.cpp | 3 +- tests/unit/graph_db_accessor_index_api.cpp | 6 +- tests/unit/property_value_store.cpp | 6 +- tests/unit/query_common.hpp | 26 ++++---- tests/unit/query_cost_estimator.cpp | 8 +-- tests/unit/query_expression_evaluator.cpp | 20 +++--- .../unit/query_plan_accumulate_aggregate.cpp | 2 +- tests/unit/query_plan_common.hpp | 8 +-- .../query_plan_create_set_remove_delete.cpp | 33 +++++----- tests/unit/query_plan_match_filter_return.cpp | 32 +++++----- tests/unit/query_planner.cpp | 24 ++++---- tests/unit/query_semantic.cpp | 2 +- tests/unit/query_variable_start_planner.cpp | 2 +- tests/unit/record_edge_vertex_accessor.cpp | 16 ++--- 57 files changed, 385 insertions(+), 390 deletions(-) rename src/{database => storage}/types.hpp (85%) diff --git a/src/database/graph_db.cpp b/src/database/graph_db.cpp index 05d457c2d..a4f7307b2 100644 --- a/src/database/graph_db.cpp +++ b/src/database/graph_db.cpp @@ -14,6 +14,8 @@ #include "transactions/engine_worker.hpp" #include "utils/flag_validation.hpp" +using namespace storage; + namespace database { namespace impl { @@ -28,9 +30,9 @@ class Base { virtual StorageGc &storage_gc() = 0; virtual durability::WriteAheadLog &wal() = 0; virtual tx::Engine &tx_engine() = 0; - virtual storage::ConcurrentIdMapper