memgraph/include/query_engine/query_result.hpp
Kruno Tomola Fabro 8a89f6601d EdgeType indexes added.
Implemented untested UniqueOrderedIndex.

Introduced TypeGroupEdge/Vertex into database.

Added Index capabilityes to PropertyFamily.
Added method for adding index.
Added method for removing index.
2016-08-25 15:29:45 +01:00

45 lines
1.1 KiB
C++

#pragma once
// !! DEPRICATED !!
// TODO: DELETE
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "storage/model/properties/properties.hpp"
template <class TG>
struct ResultList
{
using sptr = std::shared_ptr<ResultList>;
using data_t = std::vector<const Properties<TG> *>;
ResultList() = default;
ResultList(ResultList &other) = delete;
ResultList(ResultList &&other) = default;
ResultList(data_t &&data) : data(std::forward<data_t>(data)) {}
explicit operator bool() const { return data.size() > 0; }
std::vector<const Properties<TG> *> data;
};
template <class TG>
struct QueryResult
{
using sptr = std::shared_ptr<QueryResult>;
using data_t =
std::unordered_map<std::string, typename ResultList<TG>::sptr>;
QueryResult() = default;
QueryResult(QueryResult &other) = delete;
QueryResult(QueryResult &&other) = default;
QueryResult(data_t &&data) : data(std::forward<data_t>(data)) {}
explicit operator bool() const { return data.size() > 0; }
data_t data;
};