Remove Shard::Accessor (unsued)
This commit is contained in:
parent
1b0db5289d
commit
86e5b44c1c
@ -120,7 +120,7 @@ struct Element {
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
concept VerticesIt = utils::SameAsAnyOf<T, VerticesIterable, std::vector<VertexAccessor>>;
|
concept VerticesIt = utils::SameAsAnyOf<T, VerticesIterable, std::vector<VertexAccessor>>;
|
||||||
template <VerticesIt TIterable>
|
template <VerticesIt TIterable>
|
||||||
std::vector<Element<VertexAccessor>> OrderByVertices(Shard::Accessor &acc, DbAccessor &dba, TIterable &iterable,
|
std::vector<Element<VertexAccessor>> OrderByVertices(DbAccessor &dba, TIterable &iterable,
|
||||||
std::vector<msgs::OrderBy> &original_order_bys) {
|
std::vector<msgs::OrderBy> &original_order_bys) {
|
||||||
auto order_bys = original_order_bys;
|
auto order_bys = original_order_bys;
|
||||||
auto it_to_remove = std::remove_if(order_bys.begin(), order_bys.end(), [](const auto &order_by) {
|
auto it_to_remove = std::remove_if(order_bys.begin(), order_bys.end(), [](const auto &order_by) {
|
||||||
|
@ -426,7 +426,7 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ScanVerticesRequest &&req) {
|
|||||||
uint64_t sample_counter{0};
|
uint64_t sample_counter{0};
|
||||||
auto vertex_iterable = acc.Vertices(view);
|
auto vertex_iterable = acc.Vertices(view);
|
||||||
if (!req.order_bys.empty()) {
|
if (!req.order_bys.empty()) {
|
||||||
const auto ordered = OrderByVertices(acc, dba, vertex_iterable, req.order_bys);
|
const auto ordered = OrderByVertices(dba, vertex_iterable, req.order_bys);
|
||||||
// we are traversing Elements
|
// we are traversing Elements
|
||||||
auto it = GetStartOrderedElementsIterator(ordered, start_id, View(req.storage_view));
|
auto it = GetStartOrderedElementsIterator(ordered, start_id, View(req.storage_view));
|
||||||
for (; it != ordered.end(); ++it) {
|
for (; it != ordered.end(); ++it) {
|
||||||
@ -509,7 +509,7 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ExpandOneRequest &&req) {
|
|||||||
if (!req.order_by.empty()) {
|
if (!req.order_by.empty()) {
|
||||||
// Can we do differently to avoid this? We need OrderByElements but currently it returns vector<Element>, so this
|
// Can we do differently to avoid this? We need OrderByElements but currently it returns vector<Element>, so this
|
||||||
// workaround is here to avoid more duplication later
|
// workaround is here to avoid more duplication later
|
||||||
auto local_sorted_vertices = OrderByVertices(acc, dba, vertex_accessors, req.order_by);
|
auto local_sorted_vertices = OrderByVertices(dba, vertex_accessors, req.order_by);
|
||||||
vertex_accessors.clear();
|
vertex_accessors.clear();
|
||||||
std::transform(local_sorted_vertices.begin(), local_sorted_vertices.end(), std::back_inserter(vertex_accessors),
|
std::transform(local_sorted_vertices.begin(), local_sorted_vertices.end(), std::back_inserter(vertex_accessors),
|
||||||
[](auto &vertex) { return vertex.object_acc; });
|
[](auto &vertex) { return vertex.object_acc; });
|
||||||
|
Loading…
Reference in New Issue
Block a user