Properties system and core storage major refactor. STABLE STATE, unit tests added.
This commit is contained in:
@@ -76,20 +76,23 @@ public:
|
||||
*/
|
||||
size_t PropsErase(GraphDb::Property key);
|
||||
|
||||
/**
|
||||
* Returns the properties of this record.
|
||||
* @return
|
||||
*/
|
||||
const TypedValueStore<GraphDb::Property> &Properties() const;
|
||||
|
||||
void PropertiesAccept(std::function<void(const GraphDb::Property key, const TypedValue &prop)> handler,
|
||||
std::function<void()> finish = {}) const;
|
||||
|
||||
// Assumes same transaction
|
||||
friend bool operator==(const RecordAccessor &a, const RecordAccessor &b) {
|
||||
// TODO consider the legitimacy of this comparison
|
||||
assert(&a.db_accessor_ == &b.db_accessor_); // assume the same db_accessor / transaction
|
||||
return &a.vlist_ == &b.vlist_;
|
||||
}
|
||||
|
||||
friend bool operator!=(const RecordAccessor &a, const RecordAccessor &b) {
|
||||
// TODO consider the legitimacy of this comparison
|
||||
return a != b;
|
||||
assert(&a.db_accessor_ == &b.db_accessor_); // assume the same db_accessor / transaction
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "database/graph_db.hpp"
|
||||
@@ -16,6 +15,6 @@ class Vertex : public mvcc::Record<Vertex> {
|
||||
public:
|
||||
std::vector<mvcc::VersionList<Edge>*> out_;
|
||||
std::vector<mvcc::VersionList<Edge>*> in_;
|
||||
std::set<GraphDb::Label> labels_;
|
||||
std::vector<GraphDb::Label> labels_;
|
||||
TypedValueStore<GraphDb::Property> properties_;
|
||||
};
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
* Returns all the Labels of the Vertex.
|
||||
* @return
|
||||
*/
|
||||
const std::set<GraphDb::Label>& labels() const;
|
||||
const std::vector<GraphDb::Label>& labels() const;
|
||||
|
||||
/**
|
||||
* Returns EdgeAccessors for all incoming edges.
|
||||
|
||||
Reference in New Issue
Block a user