2016-01-27 06:40:11 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2016-02-22 05:21:15 +08:00
|
|
|
#include <vector>
|
2016-02-11 06:34:49 +08:00
|
|
|
#include <memory>
|
2016-02-22 05:21:15 +08:00
|
|
|
#include <unordered_map>
|
2016-01-27 06:40:11 +08:00
|
|
|
|
2016-02-22 05:21:15 +08:00
|
|
|
#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-01-27 06:40:11 +08:00
|
|
|
{
|
2016-02-11 06:34:49 +08:00
|
|
|
using sptr = std::shared_ptr<QueryResult>;
|
2016-02-22 05:21:15 +08:00
|
|
|
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
|
|
|
|
2016-02-22 05:21:15 +08:00
|
|
|
QueryResult(data_t&& data) :
|
|
|
|
data(std::forward<data_t>(data)) {}
|
2016-02-11 06:34:49 +08:00
|
|
|
|
2016-02-22 05:21:15 +08:00
|
|
|
data_t data;
|
2016-01-27 06:40:11 +08:00
|
|
|
};
|