# HG changeset patch # User František Kučera # Date 1591374387 -7200 # Node ID 1d17192565bf272e22b7beb1f99dc4e2403d07e2 # Parent c83119110c7b5ded9ec2e605d39be6809073973e add implicit --copy '.*' only if no CLI arguments were specified (original behavior) diff -r c83119110c7b -r 1d17192565bf src/relpipe-tr-sql.cpp --- a/src/relpipe-tr-sql.cpp Thu Jun 04 13:24:17 2020 +0200 +++ b/src/relpipe-tr-sql.cpp Fri Jun 05 18:26:27 2020 +0200 @@ -61,7 +61,7 @@ SqlHandler::listDataSources(writer.get(), driverManager.get()); } else if (std::regex_match(cli.programName(), std::wregex(L"^(.*/)?relpipe-in-sql$"))) { // relpipe-in-sql: - if (configuration.statements.size() == 0 && configuration.copyRelations.size() == 0) configuration.copyRelations.push_back({L".*", L"", false}); + if (cli.arguments().size() == 0) configuration.copyRelations.push_back({L".*", L"", false}); configuration.sqlBeforeRelational = isatty(fileno(stdin)) ? nullptr : &std::wcin; configuration.sqlAfterRelational = nullptr; SqlHandler handler(writer.get(), driverManager.get(), configuration);