Move the mock

This commit is contained in:
Ante Pušić 2024-01-05 13:54:30 +01:00
parent 102bf1df5e
commit ec35144265
4 changed files with 10 additions and 10 deletions

View File

@ -11,7 +11,7 @@
#include <mgp.hpp>
// #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";

View File

@ -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<durability::ParallelizedSchemaCreationInfo> &parallel_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<LabelId, memcxx_mock::text_search::IndexContext> index_;
std::map<LabelId, mgcxx_mock::text_search::IndexContext> index_;
};
} // namespace memgraph::storage

View File

@ -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

View File

@ -21,10 +21,10 @@
#include <type_traits>
#include <utility>
#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 <typename TContainer>
bool PropertyStore::DoInitProperties(const TContainer &properties, bool external, std::optional<Gid> gid) {
if (external) {
// memcxx_mock::text_search::Mock::add()
// mgcxx_mock::text_search::Mock::add()
}
uint64_t size = 0;