29 #include <relpipe/writer/RelationalWriter.h> |
29 #include <relpipe/writer/RelationalWriter.h> |
30 #include <relpipe/writer/RelpipeWriterException.h> |
30 #include <relpipe/writer/RelpipeWriterException.h> |
31 #include <relpipe/writer/Factory.h> |
31 #include <relpipe/writer/Factory.h> |
32 #include <relpipe/writer/TypeId.h> |
32 #include <relpipe/writer/TypeId.h> |
33 |
33 |
|
34 #include "PassthroughHandler.h" |
|
35 |
34 using namespace relpipe::cli; |
36 using namespace relpipe::cli; |
35 using namespace relpipe::reader; |
37 using namespace relpipe::reader; |
|
38 using namespace relpipe::tr::validator; |
36 |
39 |
37 int main(int argc, char**argv) { |
40 int main(int argc, char**argv) { |
38 CLI cli(argc, argv); |
41 CLI cli(argc, argv); |
39 |
42 |
40 int resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR; |
43 int resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR; |
41 |
44 |
42 try { |
45 try { |
43 std::shared_ptr<RelationalReader> reader(Factory::create(std::cin)); |
46 std::shared_ptr<RelationalReader> reader(Factory::create(std::cin)); |
44 //TabularPrefetchingHandler handler(std::cout); |
47 PassthroughHandler handler(std::cout); |
45 //reader->addHandler(&handler); |
48 reader->addHandler(&handler); |
46 reader->process(); |
49 reader->process(); |
47 |
50 |
48 resultCode = CLI::EXIT_CODE_SUCCESS; |
51 resultCode = CLI::EXIT_CODE_SUCCESS; |
49 |
52 |
50 } catch (RelpipeCLIException e) { |
53 } catch (RelpipeCLIException e) { |