A bit of cleanup

This commit is contained in:
Marko Budiselic 2023-03-14 10:22:10 +00:00
parent ff07360b85
commit f42bd3237e
3 changed files with 19 additions and 9 deletions

View File

@ -91,4 +91,12 @@ CheckOptions:
value: llvm
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: readability-identifier-length.MinimumVariableNameLength
value: '0'
- key: readability-identifier-length.MinimumParameterNameLength
value: '0'
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: '0'
- key: readability-identifier-length.MinimumExceptionNameLength
value: '0'
...

View File

@ -1,4 +1,4 @@
// Copyright 2022 Memgraph Ltd.
// Copyright 2023 Memgraph Ltd.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
@ -25,10 +25,12 @@
#include "utils/template_utils.hpp"
namespace memgraph::storage::v3 {
using EdgeAccessors = std::vector<storage::v3::EdgeAccessor>;
using EdgeUniquenessFunction = std::function<EdgeAccessors(EdgeAccessors &&, msgs::EdgeDirection)>;
using EdgeFiller =
std::function<ShardResult<void>(const EdgeAccessor &edge, bool is_in_edge, msgs::ExpandOneResultRow &result_row)>;
using conversions::FromPropertyValueToValue;
using msgs::Value;
template <typename T>

View File

@ -50,17 +50,13 @@
#include "utils/logging.hpp"
namespace memgraph::storage::v3 {
using msgs::Label;
using msgs::PropertyId;
using msgs::Value;
using conversions::ConvertPropertyMap;
using conversions::ConvertPropertyVector;
using conversions::ConvertValueVector;
using conversions::FromMap;
using conversions::FromPropertyValueToValue;
using conversions::ToMsgsVertexId;
using conversions::ToPropertyValue;
using msgs::PropertyId;
using msgs::Value;
auto CreateErrorResponse(const ShardError &shard_error, const auto transaction_id, const std::string_view action) {
msgs::ShardError message_shard_error{shard_error.code, shard_error.message};
@ -530,7 +526,7 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::GetPropertiesRequest &&req) {
std::vector<std::pair<PropertyId, Value>> result;
result.reserve(value.size());
for (auto &[id, val] : value) {
result.emplace_back(std::make_pair(id, std::move(val)));
result.emplace_back(id, std::move(val));
}
return result;
};
@ -707,7 +703,11 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::GetPropertiesRequest &&req) {
}
msgs::ReadResponses ShardRsm::HandleRead(msgs::GraphRequest &&req) {
LOG_FATAL("Implement ShardRsm HandleRead GraphRequest");
shard_->Access(req.transaction_id);
SPDLOG_WARN("ShardRsm::HandleRead(GraphRequest) not fully implemented");
msgs::GraphResponse response;
response.data = msgs::Graph{.vertices = {}, .edges = {}};
return response;
}
} // namespace memgraph::storage::v3