21788d003a
Summary: Dressipi CRUD queries are dummy implemented; Fixes T99 and T131 Test Plan: manual Reviewers: sale Subscribers: buda, sale Maniphest Tasks: T131, T99 Differential Revision: https://memgraph.phacility.com/D9
39 lines
980 B
C++
39 lines
980 B
C++
#pragma once
|
|
|
|
#include "mvcc/record.hpp"
|
|
#include "storage/model/edge_model.hpp"
|
|
#include "utils/string_buffer.hpp"
|
|
#include "storage/model/properties/json_writer.hpp"
|
|
#include "utils/handle_write.hpp"
|
|
|
|
class Edge : public mvcc::Record<Edge>
|
|
{
|
|
using buffer_t = utils::StringBuffer;
|
|
using props_writer_t = JsonWriter<buffer_t>;
|
|
|
|
public:
|
|
class Accessor;
|
|
|
|
Edge() = default;
|
|
Edge(const EdgeModel &data) : data(data) {}
|
|
Edge(EdgeModel &&data) : data(std::move(data)) {}
|
|
|
|
Edge(const Edge &) = delete;
|
|
Edge(Edge &&) = delete;
|
|
|
|
Edge &operator=(const Edge &) = delete;
|
|
Edge &operator=(Edge &&) = delete;
|
|
|
|
EdgeModel data;
|
|
|
|
template <typename Stream>
|
|
void stream_repr(Stream &stream) const
|
|
{
|
|
auto props = handle_write<buffer_t, props_writer_t>(data.props);
|
|
|
|
stream << "Edge(cre = " << tx.cre() << ", "
|
|
<< "exp = " << tx.exp() << ", "
|
|
<< "props = " << props.str() << ")";
|
|
}
|
|
};
|