2015-12-06 23:37:42 +08:00
|
|
|
#pragma once
|
2015-07-07 22:18:26 +08:00
|
|
|
|
2017-02-04 16:01:15 +08:00
|
|
|
#include "database/graph_db.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"
|
|
|
|
#include "storage/typed_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> {
|
2015-12-06 23:37:42 +08:00
|
|
|
public:
|
2017-02-15 21:10:16 +08:00
|
|
|
|
|
|
|
Edge(mvcc::VersionList<Vertex>& from,
|
|
|
|
mvcc::VersionList<Vertex>& to,
|
|
|
|
GraphDb::EdgeType edge_type)
|
|
|
|
: from_(from), to_(to), edge_type_(edge_type) {}
|
|
|
|
|
|
|
|
mvcc::VersionList<Vertex>& from_;
|
|
|
|
mvcc::VersionList<Vertex>& to_;
|
2017-02-04 16:01:15 +08:00
|
|
|
GraphDb::EdgeType edge_type_;
|
2017-02-11 14:51:02 +08:00
|
|
|
TypedValueStore<GraphDb::Property> properties_;
|
2015-12-06 23:37:42 +08:00
|
|
|
};
|