2015-12-06 23:37:42 +08:00
|
|
|
#pragma once
|
2015-07-07 22:18:26 +08:00
|
|
|
|
2017-03-29 18:37:58 +08:00
|
|
|
#include "database/graph_db_datatypes.hpp"
|
2015-12-06 23:37:42 +08:00
|
|
|
#include "mvcc/record.hpp"
|
2017-02-04 16:01:15 +08:00
|
|
|
#include "mvcc/version_list.hpp"
|
2017-03-01 02:38:57 +08:00
|
|
|
#include "storage/property_value_store.hpp"
|
2015-07-07 22:18:26 +08:00
|
|
|
|
2017-02-04 16:01:15 +08:00
|
|
|
// forward declare Vertex because there is a circular usage Edge <-> Vertex
|
|
|
|
class Vertex;
|
2016-11-29 11:08:08 +08:00
|
|
|
|
2017-02-04 16:01:15 +08:00
|
|
|
class Edge : public mvcc::Record<Edge> {
|
2017-02-18 18:54:37 +08:00
|
|
|
public:
|
2017-03-29 18:37:58 +08:00
|
|
|
Edge(mvcc::VersionList<Vertex> &from, mvcc::VersionList<Vertex> &to,
|
|
|
|
GraphDbTypes::EdgeType edge_type)
|
2017-02-15 21:10:16 +08:00
|
|
|
: from_(from), to_(to), edge_type_(edge_type) {}
|
|
|
|
|
2017-03-29 18:37:58 +08:00
|
|
|
mvcc::VersionList<Vertex> &from_;
|
|
|
|
mvcc::VersionList<Vertex> &to_;
|
|
|
|
GraphDbTypes::EdgeType edge_type_;
|
|
|
|
PropertyValueStore<GraphDbTypes::Property> properties_;
|
2015-12-06 23:37:42 +08:00
|
|
|
};
|