diff --git a/query_modules/text_search.cpp b/query_modules/text_search.cpp index 6c149ca6e..18ca1d33b 100644 --- a/query_modules/text_search.cpp +++ b/query_modules/text_search.cpp @@ -11,7 +11,7 @@ #include // #include "query/procedure/mg_procedure_impl.hpp" -#include "utils/memcxx.hpp" +#include "storage/v2/mgcxx_mock.hpp" namespace TextSearch { constexpr std::string_view kProcedureSearch = "search"; diff --git a/src/storage/v2/indices/text_index.hpp b/src/storage/v2/indices/text_index.hpp index dee42b576..648d537e6 100644 --- a/src/storage/v2/indices/text_index.hpp +++ b/src/storage/v2/indices/text_index.hpp @@ -9,7 +9,7 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -#include "utils/memcxx.hpp" +#include "storage/v2/mgcxx_mock.hpp" namespace memgraph::storage { @@ -30,8 +30,8 @@ class TextIndex { /// @throw std::bad_alloc bool CreateIndex(LabelId label, const std::optional ¶llel_exec_info) { - auto index_config = memcxx_mock::text_search::IndexConfig{.mappings = "TODO antepusic"}; - auto new_index = memcxx_mock::text_search::Mock::create_index(label.ToString(), index_config); + auto index_config = mgcxx_mock::text_search::IndexConfig{.mappings = "TODO antepusic"}; + auto new_index = mgcxx_mock::text_search::Mock::create_index(label.ToString(), index_config); index_[label] = new_index; return true; @@ -39,7 +39,7 @@ class TextIndex { } bool DropIndex(LabelId label) { - memcxx_mock::text_search::Mock::drop_index(label.ToString()); + mgcxx_mock::text_search::Mock::drop_index(label.ToString()); index_.erase(label); return true; } @@ -57,7 +57,7 @@ class TextIndex { uint64_t ApproximateVertexCount(LabelId label) { return 10; } - std::map index_; + std::map index_; }; } // namespace memgraph::storage diff --git a/src/utils/memcxx.hpp b/src/storage/v2/mgcxx_mock.hpp similarity index 97% rename from src/utils/memcxx.hpp rename to src/storage/v2/mgcxx_mock.hpp index e7e5b8ee5..a08adaa8d 100644 --- a/src/utils/memcxx.hpp +++ b/src/storage/v2/mgcxx_mock.hpp @@ -14,7 +14,7 @@ #ifndef MEMCXX #define MEMCXX -namespace memcxx_mock { +namespace mgcxx_mock { namespace text_search { struct IndexContext { std::string tantivyContext; // the actual type of tantivyContext is outside the mgcxx API @@ -65,6 +65,6 @@ class Mock { static void drop_index(std::string path) {} }; } // namespace text_search -} // namespace memcxx_mock +} // namespace mgcxx_mock #endif diff --git a/src/storage/v2/property_store.cpp b/src/storage/v2/property_store.cpp index e5763ab18..8cf730a83 100644 --- a/src/storage/v2/property_store.cpp +++ b/src/storage/v2/property_store.cpp @@ -21,10 +21,10 @@ #include #include +#include "storage/v2/mgcxx_mock.hpp" #include "storage/v2/temporal.hpp" #include "utils/cast.hpp" #include "utils/logging.hpp" -#include "utils/memcxx.hpp" namespace memgraph::storage { @@ -1278,7 +1278,7 @@ bool PropertyStore::SetProperty(PropertyId property, const PropertyValue &value, template bool PropertyStore::DoInitProperties(const TContainer &properties, bool external, std::optional gid) { if (external) { - // memcxx_mock::text_search::Mock::add() + // mgcxx_mock::text_search::Mock::add() } uint64_t size = 0;