src/relpipe-tr-sql.cpp
branchv_0
changeset 15 0ecde5272f8e
parent 13 19580b27ade2
child 19 44db9e1e7c7f
equal deleted inserted replaced
14:eacacf060755 15:0ecde5272f8e
    53 		Configuration configuration = cliParser.parse(cli.arguments());
    53 		Configuration configuration = cliParser.parse(cli.arguments());
    54 
    54 
    55 		if (std::regex_match(cli.programName(), std::wregex(L"^(.*/)?relpipe-in-sql$"))) {
    55 		if (std::regex_match(cli.programName(), std::wregex(L"^(.*/)?relpipe-in-sql$"))) {
    56 			// relpipe-in-sql:
    56 			// relpipe-in-sql:
    57 			std::shared_ptr<writer::RelationalWriter> writer(writer::Factory::create(std::cout));
    57 			std::shared_ptr<writer::RelationalWriter> writer(writer::Factory::create(std::cout));
       
    58 			configuration.sqlBeforeRelational = isatty(fileno(stdin)) ? nullptr : &std::wcin;
       
    59 			configuration.sqlAfterRelational = nullptr;
    58 			SqlHandler handler(writer.get(), configuration);
    60 			SqlHandler handler(writer.get(), configuration);
    59 			handler.endOfPipe();
    61 			handler.endOfPipe();
    60 		} else {
    62 		} else {
    61 			// relpipe-tr-sql:
    63 			// relpipe-tr-sql:
    62 			std::shared_ptr<reader::RelationalReader> reader(reader::Factory::create(std::cin));
    64 			std::shared_ptr<reader::RelationalReader> reader(reader::Factory::create(std::cin));