Fix clang tidy errors
This commit is contained in:
parent
7aa68164f0
commit
d820d0a9e5
@ -120,15 +120,15 @@ Value ToBoltValue(const query::v2::TypedValue &value, const msgs::ShardRequestMa
|
||||
storage::v3::View view) {
|
||||
switch (value.type()) {
|
||||
case query::v2::TypedValue::Type::Null:
|
||||
return Value();
|
||||
return {};
|
||||
case query::v2::TypedValue::Type::Bool:
|
||||
return Value(value.ValueBool());
|
||||
return {value.ValueBool()};
|
||||
case query::v2::TypedValue::Type::Int:
|
||||
return Value(value.ValueInt());
|
||||
return {value.ValueInt()};
|
||||
case query::v2::TypedValue::Type::Double:
|
||||
return Value(value.ValueDouble());
|
||||
return {value.ValueDouble()};
|
||||
case query::v2::TypedValue::Type::String:
|
||||
return Value(std::string(value.ValueString()));
|
||||
return {std::string(value.ValueString())};
|
||||
case query::v2::TypedValue::Type::List: {
|
||||
std::vector<Value> values;
|
||||
values.reserve(value.ValueList().size());
|
||||
@ -136,7 +136,7 @@ Value ToBoltValue(const query::v2::TypedValue &value, const msgs::ShardRequestMa
|
||||
auto value = ToBoltValue(v, shard_request_manager, view);
|
||||
values.emplace_back(std::move(value));
|
||||
}
|
||||
return Value(std::move(values));
|
||||
return {std::move(values)};
|
||||
}
|
||||
case query::v2::TypedValue::Type::Map: {
|
||||
std::map<std::string, Value> map;
|
||||
@ -144,28 +144,28 @@ Value ToBoltValue(const query::v2::TypedValue &value, const msgs::ShardRequestMa
|
||||
auto value = ToBoltValue(kv.second, shard_request_manager, view);
|
||||
map.emplace(kv.first, std::move(value));
|
||||
}
|
||||
return Value(std::move(map));
|
||||
return {std::move(map)};
|
||||
}
|
||||
case query::v2::TypedValue::Type::Vertex: {
|
||||
auto vertex = ToBoltVertex(value.ValueVertex(), shard_request_manager, view);
|
||||
return Value(std::move(vertex));
|
||||
return {std::move(vertex)};
|
||||
}
|
||||
case query::v2::TypedValue::Type::Edge: {
|
||||
auto edge = ToBoltEdge(value.ValueEdge(), shard_request_manager, view);
|
||||
return Value(std::move(edge));
|
||||
return {std::move(edge)};
|
||||
}
|
||||
case query::v2::TypedValue::Type::Path: {
|
||||
auto path = ToBoltPath(value.ValuePath(), shard_request_manager, view);
|
||||
return Value(std::move(path));
|
||||
return {std::move(path)};
|
||||
}
|
||||
case query::v2::TypedValue::Type::Date:
|
||||
return Value(value.ValueDate());
|
||||
return {value.ValueDate()};
|
||||
case query::v2::TypedValue::Type::LocalTime:
|
||||
return Value(value.ValueLocalTime());
|
||||
return {value.ValueLocalTime()};
|
||||
case query::v2::TypedValue::Type::LocalDateTime:
|
||||
return Value(value.ValueLocalDateTime());
|
||||
return {value.ValueLocalDateTime()};
|
||||
case query::v2::TypedValue::Type::Duration:
|
||||
return Value(value.ValueDuration());
|
||||
return {value.ValueDuration()};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ bool FilterOnVertex(DbAccessor &dba, const storage::v3::VertexAccessor &v_acc, c
|
||||
|
||||
ShardResult<msgs::ExpandOneResultRow> GetExpandOneResult(
|
||||
Shard::Accessor &acc, msgs::VertexId src_vertex, const msgs::ExpandOneRequest &req,
|
||||
const EdgeUniquenessFunction &maybe_filter_based_on_edge_uniquness, const EdgeFiller &edge_filler,
|
||||
const EdgeUniquenessFunction &maybe_filter_based_on_edge_uniqueness, const EdgeFiller &edge_filler,
|
||||
const Schemas::Schema &schema) {
|
||||
/// Fill up source vertex
|
||||
const auto primary_key = ConvertPropertyVector(src_vertex.second);
|
||||
@ -379,7 +379,7 @@ ShardResult<msgs::ExpandOneResultRow> GetExpandOneResult(
|
||||
}
|
||||
|
||||
/// Fill up connecting edges
|
||||
auto fill_up_connecting_edges = FillUpConnectingEdges(v_acc, req, maybe_filter_based_on_edge_uniquness);
|
||||
auto fill_up_connecting_edges = FillUpConnectingEdges(v_acc, req, maybe_filter_based_on_edge_uniqueness);
|
||||
if (fill_up_connecting_edges.HasError()) {
|
||||
return fill_up_connecting_edges.GetError();
|
||||
}
|
||||
@ -403,7 +403,7 @@ ShardResult<msgs::ExpandOneResultRow> GetExpandOneResult(
|
||||
ShardResult<msgs::ExpandOneResultRow> GetExpandOneResult(
|
||||
VertexAccessor v_acc, msgs::VertexId src_vertex, const msgs::ExpandOneRequest &req,
|
||||
std::vector<EdgeAccessor> in_edge_accessors, std::vector<EdgeAccessor> out_edge_accessors,
|
||||
const EdgeUniquenessFunction &maybe_filter_based_on_edge_uniquness, const EdgeFiller &edge_filler,
|
||||
const EdgeUniquenessFunction &maybe_filter_based_on_edge_uniqueness, const EdgeFiller &edge_filler,
|
||||
const Schemas::Schema &schema) {
|
||||
/// Fill up source vertex
|
||||
msgs::Vertex source_vertex = {.id = src_vertex};
|
||||
@ -420,8 +420,8 @@ ShardResult<msgs::ExpandOneResultRow> GetExpandOneResult(
|
||||
}
|
||||
|
||||
/// Fill up connecting edges
|
||||
auto in_edges = maybe_filter_based_on_edge_uniquness(std::move(in_edge_accessors), msgs::EdgeDirection::IN);
|
||||
auto out_edges = maybe_filter_based_on_edge_uniquness(std::move(out_edge_accessors), msgs::EdgeDirection::OUT);
|
||||
auto in_edges = maybe_filter_based_on_edge_uniqueness(std::move(in_edge_accessors), msgs::EdgeDirection::IN);
|
||||
auto out_edges = maybe_filter_based_on_edge_uniqueness(std::move(out_edge_accessors), msgs::EdgeDirection::OUT);
|
||||
|
||||
msgs::ExpandOneResultRow result_row;
|
||||
result_row.src_vertex = std::move(source_vertex);
|
||||
|
Loading…
Reference in New Issue
Block a user