diff -r d13b0b5969aa -r 911ec74cce33 relpipe-out-tabular.cpp --- a/relpipe-out-tabular.cpp Sat Sep 08 19:44:51 2018 +0200 +++ b/relpipe-out-tabular.cpp Sun Sep 09 02:00:00 2018 +0200 @@ -7,25 +7,11 @@ #include #include +#include "src/TabularPrefetchingHandler.h" using namespace relpipe::cli; using namespace relpipe::reader; - -class DemoHandler : public handlers::RelationalReaderStringHadler { - - void startRelation(string_t name, std::vector > attributes) override { - std::wcout << L"start relation: " << name << std::endl << std::flush; - for (int i = 0; i < attributes.size(); i++) { - std::wcout << L"\tcolumn: " << attributes[i].first << L" / " << (int) attributes[i].second << std::endl << std::flush; - } - } - - void attribute(const string_t& value) override { - std::wcout << L"attribute: " << value << std::endl << std::flush; - } - - -}; +using namespace relpipe::out::tabular; int main(int argc, char** argv) { CLI cli(argc, argv); @@ -42,7 +28,7 @@ // } std::shared_ptr reader(Factory::create(std::cin)); - DemoHandler handler; + TabularPrefetchingHandler handler(std::cout); reader->addHandler(&handler); reader->process();