Move the mock
This commit is contained in:
parent
102bf1df5e
commit
ec35144265
@ -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";
|
||||
|
@ -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> ¶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<LabelId, memcxx_mock::text_search::IndexContext> index_;
|
||||
std::map<LabelId, mgcxx_mock::text_search::IndexContext> index_;
|
||||
};
|
||||
|
||||
} // namespace memgraph::storage
|
||||
|
@ -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
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user