memgraph/query_engine/query_result.hpp

39 lines
864 B
C++
Raw Normal View History

#pragma once
#include <string>
#include <vector>
2016-02-11 06:34:49 +08:00
#include <memory>
#include <unordered_map>
#include "storage/model/properties/properties.hpp"
struct ResultList
{
using sptr = std::shared_ptr<ResultList>;
using data_t = std::vector<const Properties*>;
ResultList() = delete;
ResultList(ResultList& other) = delete;
ResultList(ResultList&& other) = default;
ResultList(data_t&& data) :
data(std::forward<data_t>(data)) {}
std::vector<const Properties*> data;
};
struct QueryResult
{
2016-02-11 06:34:49 +08:00
using sptr = std::shared_ptr<QueryResult>;
using data_t = std::unordered_map<std::string, ResultList::sptr>;
QueryResult() = delete;
QueryResult(QueryResult& other) = delete;
QueryResult(QueryResult&& other) = default;
2016-02-11 06:34:49 +08:00
QueryResult(data_t&& data) :
data(std::forward<data_t>(data)) {}
2016-02-11 06:34:49 +08:00
data_t data;
};