memgraph/src/storage/edge_accessor.hpp

43 lines
756 B
C++
Raw Normal View History

#pragma once
#include "storage/edge.hpp"
#include "storage/record_accessor.hpp"
class Edges;
class Edge::Accessor : public RecordAccessor<Edge, Edges, Edge::Accessor>
{
public:
using RecordAccessor::RecordAccessor;
2016-03-13 03:16:19 +08:00
void edge_type(EdgeType type)
{
this->record->data.edge_type = type;
}
2016-03-20 15:56:13 +08:00
const std::string& edge_type() const
{
return this->record->data.edge_type;
}
2016-03-13 03:16:19 +08:00
void from(VertexRecord* vertex_record)
{
this->record->data.from = vertex_record;
}
void to(VertexRecord* vertex_record)
{
this->record->data.to = vertex_record;
}
auto from()
{
return this->record->data.from;
}
auto to()
{
return this->record->data.to;
}
};