memgraph/include/storage/edge_record.hpp
Kruno Tomola Fabro 8a89f6601d EdgeType indexes added.
Implemented untested UniqueOrderedIndex.

Introduced TypeGroupEdge/Vertex into database.

Added Index capabilityes to PropertyFamily.
Added method for adding index.
Added method for removing index.
2016-08-25 15:29:45 +01:00

36 lines
871 B
C++

#pragma once
#include "mvcc/version_list.hpp"
#include "storage/edge.hpp"
class VertexRecord;
class EdgeRecord : public mvcc::VersionList<Edge>
{
public:
EdgeRecord(Id id, VertexRecord *from, VertexRecord *to)
: from_v(from), to_v(to), VersionList(id)
{
}
EdgeRecord(const VersionList &) = delete;
/* @brief Move constructs the version list
* Note: use only at the beginning of the "other's" lifecycle since this
* constructor doesn't move the RecordLock, but only the head pointer
*/
EdgeRecord(EdgeRecord &&other)
: from_v(other.from_v), to_v(other.to_v), VersionList(std::move(other))
{
}
VertexRecord *&get_key() { return this->from_v; }
auto from() const { return this->from_v; }
auto to() const { return this->to_v; }
protected:
VertexRecord *from_v;
VertexRecord *to_v;
};