21788d003a
Summary: Dressipi CRUD queries are dummy implemented; Fixes T99 and T131 Test Plan: manual Reviewers: sale Subscribers: buda, sale Maniphest Tasks: T131, T99 Differential Revision: https://memgraph.phacility.com/D9
35 lines
778 B
C++
35 lines
778 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "mvcc/version_list.hpp"
|
|
#include "storage/edge_record.hpp"
|
|
|
|
class EdgeList
|
|
{
|
|
public:
|
|
auto begin() { return edges.begin(); }
|
|
auto begin() const { return edges.begin(); }
|
|
auto cbegin() const { return edges.begin(); }
|
|
|
|
auto end() { return edges.end(); }
|
|
auto end() const { return edges.end(); }
|
|
auto cend() const { return edges.end(); }
|
|
|
|
void add(EdgeRecord *edge) { edges.emplace_back(edge); }
|
|
|
|
size_t degree() const { return edges.size(); }
|
|
|
|
void remove(EdgeRecord *edge)
|
|
{
|
|
edges.erase(std::remove(edges.begin(), edges.end(), edge), edges.end());
|
|
}
|
|
|
|
void clear() { edges.clear(); }
|
|
|
|
std::size_t size() { return edges.size(); }
|
|
|
|
private:
|
|
std::vector<EdgeRecord *> edges;
|
|
};
|