2016-12-14 17:27:41 +08:00
|
|
|
#pragma once
|
|
|
|
|
2017-02-18 18:54:37 +08:00
|
|
|
#include <iostream>
|
|
|
|
#include <map>
|
2016-12-14 17:27:41 +08:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2017-04-10 18:22:48 +08:00
|
|
|
#include "query/typed_value.hpp"
|
2017-02-23 21:19:52 +08:00
|
|
|
#include "storage/edge_accessor.hpp"
|
|
|
|
#include "storage/vertex_accessor.hpp"
|
|
|
|
|
2017-02-15 21:10:16 +08:00
|
|
|
class PrintRecordStream {
|
2017-02-18 18:54:37 +08:00
|
|
|
private:
|
2017-02-15 21:10:16 +08:00
|
|
|
std::ostream &stream;
|
2016-12-14 17:27:41 +08:00
|
|
|
|
2017-02-18 18:54:37 +08:00
|
|
|
public:
|
2017-02-15 21:10:16 +08:00
|
|
|
PrintRecordStream(std::ostream &stream) : stream(stream) {}
|
2016-12-14 17:27:41 +08:00
|
|
|
|
2017-03-22 23:36:48 +08:00
|
|
|
// TODO: all these functions should pretty print their data
|
|
|
|
void Header(const std::vector<std::string> &fields) {
|
|
|
|
stream << "Header\n";
|
2017-02-15 21:10:16 +08:00
|
|
|
}
|
2016-12-14 17:27:41 +08:00
|
|
|
|
2017-04-10 18:22:48 +08:00
|
|
|
void Result(std::vector<query::TypedValue> &values) {
|
2017-03-22 23:36:48 +08:00
|
|
|
stream << "Result\n";
|
2017-02-15 21:10:16 +08:00
|
|
|
}
|
2016-12-14 17:27:41 +08:00
|
|
|
|
2017-04-10 18:22:48 +08:00
|
|
|
void Summary(const std::map<std::string, query::TypedValue> &summary) {
|
2017-03-22 23:36:48 +08:00
|
|
|
stream << "Summary\n";
|
2017-02-15 21:10:16 +08:00
|
|
|
}
|
2016-12-14 17:27:41 +08:00
|
|
|
};
|